Declaration style??

I am learning Java and using IntellijIDEA IDE. Something funny happened when I wrote the following statement:
Locale currentLocale = new Locale(language)
The IDE "suggested" me to "split into declaration and statement" like this:
Locale currentLocale;
currentLocale = new Locale(language);
Just out of curiosity, do you guys have any idea if the suggested style is an accepted best practice for Java coding. I mean, I did not see anything wrong on my original statement, but I am open to change my style since I am just starting to learn.

If I'm writing code and I am just going to initialize when I declare, e.g. your first line, then I would write it like your first line, and not split it. It's just a waste of a line, and maybe no significance for the compiled code, but it reads better, IMO.
The latter way I would only use if I specifically don't want to initialize an object, such as a GUI component variable that I maybe need to initialize in a constructor or some other method.

Similar Messages

  • How do you declare objects in the master database

    I am trying to register our CLR assembly as an unsafe assembly without having to make the database trustworthy.  Since making the database is_trustworthy_on = 1 is not a best practice, and would cause some of our customers (and our development process)
    a little bit of grief.
    I have read a ton about it but am still having trouble.
    The reason the assembly is 'Unsafe' is because it is calling the TimeZoneInfo class to convert between timezones, since we are not yet on UTC dates.  We plan to in the future but that's a big project.
    We are also not using the 'SQLCLR' but rather have written our own class library and just have a project reference to it, which works just the same, but we have found to be better for the C# programmers.
    I am playing with signing the assembly using an SNK file and have figured out what I need to do, including 1) creating a master key, 2) creating an asymmetric key using the same SNK file that signed the assembly, 3) creating a login for the asymmetric key,
    and 4) granting unsafe assembly to the login.
    When I do all that with straight SQL, it actually works!  But I am having trouble fitting this into our SSDT world.
    Should I create a separate SSDT project for items #1 through #4 above, and reference it, and check 'Include composite objects' in our publishing options?  As stated in this blog post though, I'm terrified of messing up the master database, and I'm not
    excited about the overhead of another project, a 2nd dacpac, etc.
    http://blogs.msdn.com/b/ssdt/archive/2012/06/26/composite-projects-and-schema-compare.aspx
    Since we do use a common set of deployment options in a deployment tool we wrote, which does set the 'block on data loss' to false, and the 'drop objects not in source' to true, b/c we drop tables all the time during the course of refactoring, etc. 
    I don't want to drop anything in master though, and I don't want to have to publish it separately if we didn't have to. 
    I suppose I could just have some dynamic SQL in a pre-deployment script that takes care of the master database, but I was trying to do it the 'right' way, in a declarative style, but struggling.
    So, in short, what's the recommended approach for getting an 'unsafe' CLR assembly into an SSDT project?
    The error that started all this was:
    CREATE ASSEMBLY for assembly *** failed because assembly *** is not authorized for PERMISSION_SET = UNSAFE. 
    The assembly is authorized when either of the following is true:
    the database owner (DBO) has UNSAFE ASSEMBLY permission and the database has the TRUSTWORTHY database property on;
    or
    the assembly is signed with a certificate or an asymmetric key that has a corresponding login with UNSAFE ASSEMBLY permission.
    Also, would a certificate be better than an asymmetric key?  I'm not entirely sure of the difference just yet to be honest.
    Thanks,
    Ryan

    After much fighting with this, figured something out as a workaround, and thought I'd share it.
    First, I'm pretty certain the SSDT declarative way for these master objects just doesn't work yet.
    My workaround was to make a pre-deployment script (that runs when we create new databases, as well as for the current release), that takes care of the security items needed to support a signed CLR assembly with unsafe permissions.
    One issue we were running into was when it came to creating the asymmetric key, there are 4 ways to do so, and we didn't want to depend on a hard-coded/absolute file path.  The 4 ways are "From file", "from external file", "from
    assembly", or "from provider".  I still don't 100% understand the from provider way, but ultimately we are actually using the from assembly way, with a little trick/hack I did that allows us to not have to use the 'from file' way and to
    reference a hard-coded path on someone's C:\ drive.  I really really didn't want to do that b/c we create local dev databases all the time and not everyone has the same paths setup.  Also, our databases are deployed on our servers as well as remote-hosted-customer
    servers, and up until now, the database release has not needed file system access.  Even the CLR itself is created using assembly_bits, which is awesome.
    So I thought of something...
    What if I had a simple/temporary assembly, which I create from assembly_bits, use to import the public key from, through the create asymmetric key from assembly command, and then drop as if it never existed?
    Well...it works!
    Here is my current prototype of a pre-deployment script, which I'll go through and cleanup more, but thought I'd share.  I also want to document how I created the temporary assembly_bits in case anyone ever wants or needs to know, even though they really
    shouldn't.  But it should make them feel better.  Basically I just created did this to get them:
    1 - Created a C# Class Library project in the solution.
    2 - Added our .SNK to that project and removed the 'Class1.cs' that it created by default
    3 - Signed that class library with the .SNK
    4 - Added a project reference to that class library from the main database solution.
    5 - Generated a deployment script (but didn't run it) and grabbed the create assembly statement (copy/paste)
    6 - Deleted the temporary project
    7 - Pasted the code I had copy/pasted into the pre-deployment script
    Note that the objects do apparently need to go into MASTER, so at the end of the pre deployment script, I switch back to the automatic [$(DatabaseName)] after first having done USE master.
    Hope this helps someone.  Finally got it!
    BTW - The other way we almost used was to introduce a SqlCmdVariable of $StrongNameKeyFilePath but that would have been a hassle for people to set whenever they got a new machine, etc.
    Thanks,
    Ryan
    PRINT '**************************************************************************'
    PRINT 'Pre\SetupMasterDatabaseKeysAndLoginsIfNecessary.sql'
    PRINT '**************************************************************************'
    PRINT '************************************************************************************'
    PRINT 'If they do not already exist, create the database master key, as well as the asymmetric'
    PRINT 'key, from the Strong-Named File (.SNK) which signed the CLR assembly.  Finally, also'
    PRINT 'create a login from that asymmetric key and grant it the UNSAFE ASSEMBLY permission.'
    PRINT 'This is all necessary b/c the CLR currently has to be referenced for UNSAFE permissions'
    PRINT 'in order to access the TimeZoneInfo class.  This code and these objects can be removed'
    PRINT 'if the system is ever updated to use all UTC dates and no longer requires the TimeZoneInfo class.'
    PRINT '************************************************************************************'
    USE master
    PRINT N'Creating Temporary Assembly [Wits.Database.AsymmetricKeyInitialization]...'
    CREATE ASSEMBLY [Wits.Database.AsymmetricKeyInitialization]
        AUTHORIZATION [dbo]
        FROM 0x4D5BlahBlahBlah;
    IF NOT EXISTS (SELECT 1 FROM sys.symmetric_keys WHERE name LIKE '%DatabaseMasterKey%')
        BEGIN
            PRINT 'Creating Master Key...'
            CREATE MASTER KEY
                ENCRYPTION BY PASSWORD = 'I Removed This Part For This Post'
        END
    IF NOT EXISTS (SELECT 1 FROM sys.asymmetric_keys WHERE name = 'ClrExtensionAsymmetricKey')
        BEGIN
            PRINT 'Creating Asymmetric Key from strong-named file...'
            CREATE ASYMMETRIC KEY [ClrExtensionAsymmetricKey]
                FROM ASSEMBLY [Wits.Database.AsymmetricKeyInitialization]
        END
    IF NOT EXISTS (SELECT 1 FROM sys.server_principals WHERE type_desc = 'ASYMMETRIC_KEY_MAPPED_LOGIN' AND name = 'ClrExtensionLogin')
        BEGIN
            PRINT 'Creating Login from Asymmetric Key...'
            CREATE LOGIN [ClrExtensionLogin] FROM ASYMMETRIC KEY [ClrExtensionAsymmetricKey]
            PRINT 'Granting Permissions to Login created from Asymmetric Key...'
            GRANT UNSAFE ASSEMBLY TO ClrExtensionLogin
        END
    PRINT N'Dropping Temporary Assembly [Wits.Database.AsymmetricKeyInitialization]...'
    DROP ASSEMBLY [Wits.Database.AsymmetricKeyInitialization]
    USE [$(DatabaseName)]

  • Boilerplate.css questions

    Why are we not to tamper with the Boilerplate.css?
    I understand the reasoning as far as breaking page structure goes, but the file also has css styles for the likes of 'a href' colours and text decoration. Is this really necessary because it doesn't do anything for structure, but it is for some reason overriding my declared styles for a href and this is forcing me to have to write more code to compound styles to specific areas just to get text-based links to display how I want them to. I have boilerplate.css imported before any other imported style sheet, so things like a href should be overridden shouldn't they.
    The declared styles for a href are almost the same as the default colours of web links anyway, so I don't understand why they are in the boilerplate.css... can anybody tell me what's the harm of changing these kind of structureless tags?
    Thanks

    Hi
    You are at liberty to modify the boilerplate css file as you wish.
    The reason it is not recommended to do so, is because browsers do not all have the same css defaults, and boilerplate is coded so for just this reason, (to give all browsers the same default settings).
    So, if you know what you are doing, then modify as you see fit, just be aware of what you modify, and ensure you test in all browsers and on all types of device before deploying your site.
    PZ

  • Please give me some suggestion!

    I want to concentrate on programming and network, and my university provides the following paper, so can you give me some suggestion, show me what paper should I choose?
    1. Advanced Data Communications
    The application of OSI data communication systems. Topics covered include: the OSI layered model, ASN 1 and object modelling, OSI control, mail systems, directory systems, OSI applications
    2. Advanced Database Systems
    An in-depth examination of the technical aspects of database systems providing the essential foundation for a career in database systems. The emphasis will be to keep abreast with available database technology approaches and techniques in industrial and commercial information systems.
    3. Software Engineering
    Software Engineering is a discipline that integrates methods, tools and procedures for the development of computer systems. The course addresses a range of software development paradigms and processes and assesses these models against the broad array of tasks needed to develop and maintain information systems. Emphasis is on the IEEE standards to develop effective information systems.
    4. Computer Organisation
    The functioning and organisation of modern computer systems. Architecture of computers and computer systems. Processor organisation and implementation. Data representation and instruction formats, microprogramming, input/output systems, virtual memory and hierarchical memory systems.
    5. Data Communications Fundamentals
    The structure of data communications and networks, particularly the lower levels of the communications architecture hierarchy. The OSI communications model, data transmission and coding, link-level protocols, local area networks, wide area networks and internetworking, transport protocols, introduction to ISDN, BISDN, Frame Relay.
    6. Algorithmics
    Further development of problem-solving and algorithm design methods, including: induction, divide-and-conquer, dynamic programming, greedy algorithms and graph algorithms. New topics such as: proof of correctness, amortised complexity, complexity lower bounds, decision trees, backtracking, branch-and-bound, probabilistic algorithms, advanced information structures and NP-completeness.
    7. Language Implementation
    The compilation and interpretation of computer languages, lexical analysis, top-down and bottom-up parsing, interpreters, procedure call conventions, symbol table analysis, code generation for control structures and expressions, attribute grammars
    8. Distributed Objects and Algorithms
    This course gives an appreciation of modern client-server development, based on distributed objects and their integration with databases and the Web. A comparative study of relevant technologies such as RMI, CORBA and DCOM.
    9. Operating Systems
    What is an operating system? Operating system principles: concurrent processes, processor management, memory management, disk management, management of other peripherals, computer security. Interacting with people: system implementation and job control languages.
    10. Mathematical Foundations of Computer Science
    The aim is to create a mathematical model for computers and computation, and to derive results about what can and cannot be computed. The course deals with idealised computers (automata) which operate on idealised inputs and outputs (formal languages).
    11. Functional and Logic Programming
    A practical introduction to programming in functional and logic programming languages. In particular, the course introduces a declarative style of programming, in which the emphasis is placed more on what a programme achieves than how it is to achieve it.
    12. Introduction to Artificial Intelligence
    An introduction to artificial intelligence (AI). AI is concerned with the construction of computer systems that perform tasks usually thought to require intelligence, such as playing chess or diagnosing an illness. The course introduces the basic concepts of AI, as well as a number of advanced topics.
    13. Graphics and Graphical User Interface Programming
    Fundamentals of 2D computer graphics: physical and virtual graphical I/O devices, graphical toolkits, transformations, algorithms. An introduction to 3D graphics: projection, transformations, visible-surface determination. Advanced GUI programming. Building software components. Software engineering.
    pick maximun 7 papaer from the above. could you order your suggestion from move favourite to less?
    Thank you for you time.

    Hi
    Please do not poast such kind of request at this site.
    Anyway it should be
    8
    9
    7
    6
    5
    2
    1
    You can change the order but the subject for relevance is as mentioned.
    Bye

  • HELP!! Cant find my children (XSLT)

    I desperately need some guidance here.... this is the problem
    I have an xml file which I create from a txt file. The names of the nodes correspond to the names of the file (something I should not have done! ) eg
    <vCards>
    <vCard_file1 name="file1">
    </vCard_file1>
    <vCard_file2 name="file2">
    </vCard_file2>
    etc..
    </vCards>
    I should not have created the children of "vCards" with those names and kept them as vCard only however this is where someone may be able to help (plzz)
    Is there anyway using xslt I can extract the values of the attribute name? Thing is I dont know in advance what the name of the node is going to be (as it depends on the file opened) so I cant seem to write a template for that "unknown" element.
    This is what I have so far....
    <xsl:template match="/">
         <xsl:call-template name="html"/>                    
    </xsl:template>
    <xsl:template name="html">
         <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
              <xsl:call-template name="head"/>     
              <xsl:call-template name="body"/>
         </html>
    </xsl:template>     
    <xsl:template name="head">
         <head>               
         <title>Selected Information</title>
         </head>
    </xsl:template>
    <xsl:template name="body">
    <body>          
         <xsl:call-template name="vCards"/>     
    </body>
    </xsl:template>     
    <xsl:template name="vCards">
         <xsl:call-template name="children"/>     
    </xsl:template>     
    <xsl:template name="children">
    <xsl:for-each select="child::*">
         <xsl:value-of select="//@Name"/>
    </xsl:for-each>
    </xsl:template>
    With this code I only get "fileName1" i.e only the first attribute and none of the others.....any ideas? as to how I could get the attributes of all the children of "vCards"?
    If someone can help me with this problem, I would be forever indebted!
    Thankyou!

    I can't quite make out what you're trying to do with your procedural-style xslt, but I think this extracts the attributes you want using the normal declarative-style:<xsl:stylesheet
      xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
      xmlns="http://www.w3.org/1999/xhtml"
      version="1.0">
      <xsl:output method="html" indent="yes"/>
      <xsl:template match="/">
        <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
          <head>
            <xsl:apply-templates mode="head"/>
          </head>
          <body>
            <xsl:apply-templates mode="body"/>
          </body>
        </html>
      </xsl:template>
      <xsl:template match="vCards" mode="head">
        <title>Selected Information</title>
      </xsl:template>
      <xsl:template match="vCards" mode="body">
        <ul>
          <xsl:for-each select="*">
            <li>
              <xsl:value-of select="@name"/>
            </li>
          </xsl:for-each>
        </ul>
      </xsl:template>
    </xsl:stylesheet>

  • Show Custom Busy Cursor on RemoteObject calls

    Hi,
    I am trying to display a custom image as busy cursor while making remote object calls in flex 4 with cairngorm.
    i tried in two different ways and neither worked -
    First approach - declaring style for CursorManager in css style sheet:-
    CursorManager {
    busy-cursor: Embed(source="/com/officemax/amps/assets/images/ball-3.jpg");
    This did not work as it could not resolve a namespace and i could not find CursorManager either with mx or s namespace.
    Second approach - set cursormanager style on initiliaze of application file:-
    [Embed(source="/com/officemax/amps/assets/images/ball-3.jpg")]
    public var busyImg:Class;
    and on init method-
    styleManager.getStyleDeclaration("mx.managers.CursorManager").setStyle("busy-cursor", busyImg);
    This did not work either. this returned CSSDeclaration class for the CursorManager but I could not see the cursor reflect.
    I do not want to set and remove cursor upon each call, i want to apply it globally.
    Any ideas are greatly appreciated.
    Thank You.

    @lakshdn,
    The two approached you used should work. I suspect surely you made mistakes..Well let me explain..
    In the CSS style declaration below make sure you have assigned the correct relative. If you are getting any error saying that it could not resolve the path or namespace then it means that you have not assigned the image path correctly. Make sure it is given correctly.
    CursorManager {
    busy-cursor: Embed(source="/com/officemax/amps/assets/images/ball-3.jpg");
    Well coming to AS style of setting cursor manager . You have used systemManager with lower case for s and in the setStyle method you need to use the busyCursor instead of busy-cursor(similar to css).
    styleManager.getStyleDeclaration("mx.managers.CursorManager").setStyle ("busy-cursor", busyImg); - wrong way of assigning.
    StyleManager.getStyleDeclaration("mx.managers.CursorManager").setStyle ("busyCursor", busyImg); - correct way of assigning.
    Observe the changes I made in bold letters.
    Always remember when you are setting styles in AS using setStyle method you need to give the properties in the lower camel case but not as you give in the css. In css we can use any king of style (either word seperated by hyphen or lower camel case syntax)
    Hope this is clear ..make these changes and check..
    Thanks,
    Bhasker

  • Add * to Requried Field

    Is there an easy way to add the * symbol to a field to let someone know that the field is required?
    Yes, I can add it to the label, but it isn't RED and BOLD.
    thanks,
    Brad
    Edited by: bsmith111 on Sep 2, 2009 5:13 AM

    Hello
    There are at least 3 ways to do this:
    1. add * to name of field
    2. add * to template example:
    Before Label field:
    <label for="#CURRENT_ITEM_NAME#" tabindex="999"><span class="t502RequiredLabel">
    <label for="#CURRENT_ITEM_NAME#" tabindex="999"><span class="t502RequiredLabel"> *
    3. add appropriate input in css:
    look for :before attribute in css topics around the globe :) - although this may not work in IE as far as i remember
    To make it also Red and bold you need to declare style for it like this:
    &lt;span style="font-weight: bold; color: red;"&gt; * &lt;/span&gt;
    piotr.y
    Edited by: piotr.y on 2009-09-02 05:36

  • Transaktion type of operations

    Hello,
    first of all I'm using SAP NetWeaver CE.
    My scenario:
    I have created a CAF-Project where I import RFC Modules as External Services. Then I created an Application Service (AS_1) in the same CAF-Project where I created Application Service Operations (Implemented not enabled). Then I map the external service operations to application service operations. The external service operations read from and write to the R/3 backend system. I set the Transaction Type of the Application Service Operations to Supports because if I create Automatic Mappings for Application Services as described [here|http://help.sap.com/saphelp_nwce10/helpdata/en/ad/b88de027c34daf96db9ac3d8a92194/frameset.htm] (Creating Automatic Mappings for Application Services) the Transaction Type is automatically set to Supports.
    Now my first question: Why do I have to associate operations with transactions? What's the background in conjunction with RFCs?
    My second question: If in the middle of the execution of an RFC module is an interruption and not all data, the RFC module have to write, is actually write, is there a rollback on the R/3 backend like described [here|http://java.sun.com/javaee/5/docs/tutorial/backup/doc/Transaction2.html]?
    My third question: Can somebody give me a detailed description why I have to set the Transaction Type to Supports in this scenario?
    After I do the mapping I created a second Application Service(AS_2). I created operations(Implemented enabled) where I use the operations of the AS_1. There I set the Transaction Type to Required because in the SAP NetWeaver CE Library is an example where one also use operations of an other Application Service and the Transaction Type is also set to Required.
    Now my fourth question: Is this the right way to set the Transaction Type of the AS_2 to Required? And Why?
    Fifth question: Is it the right way to the setting of the Transaction Type of AS_1 and AS_2? and Why?
    Regards,
    Armin

    Hi Armin,
    Please see below my answers to your questions:
    1st question:
    As you probably know in JEE there are two ways of dealing with transactions - programming and declarative. In the programming style, the developer defines the transactions boundaries by invoking the transaction begin(), commit() and rollback() methods. In the declarative style, each operation is assigned a transaction attribute (required, mandatory, supports ...). CAF uses the declarative approach and therefore each operation is assigned a transaction attribute. This style is not specific for RFCs, it is a standard JEE approach.
    2nd question:
    It depends on the backend RFC function implementation. Usually BAPIs support this and if something fails, everything is rollbacked.
    3rd quesiton:
    It is not mandatory to set the transaction type to 'Supports'. 'Supports' is the default value and you can change it afterwards if you like.
    4th and 5th questions:
    There's no general rule of thumb how to set operations Transaction Types. It depends on your concrete operations, on the business logic you want to achieve and so on.
    Regards,
    Trendafil

  • Flex SDK 4 : mx.chart package and declaration of style 'direction' conflicts with previous declaration problem

    Hi There,
    We have recently downloaded SDK 4 and had configured the same for
    developement in flex builder 3, we are already using SDK 3.0. However
    to our surprise there were compile time error reported for mx.chart
    related classes. To resolve this we thought to import relevant .swc
    like datavisualization, automation from sdk 3.0, and it worked and
    resolved compile time error. But we landed up in on more problem that
    is 'Declaration of style 'direction' conflicts with previous
    declaration in E:\Softwares\FlexBuilder\sdks\SDK 4\frameworks\libs
    \datavisualization.swc(mx/charts/GridLines)'.
    If you could pleas help us to resolve these issues and also if you
    could answer these queries would be good
    1) SDK 4 has been declared to be open source, then why mx.chart
    package is not part of it?
    2) Why would 'Declaration of style 'direction' conflicts with previous
    declaration' occur?
    3) What are the other component and packages that are not part of open
    source for which license is still required?
    Waiting for reponse in anticipation.
    Thanks,

    I got this same error with the following setup.
    1. Building a SWC with Flex 4.0 Beta2 on FlashBuilder4
    2. SWC references other SWC that are built with Flex3.
    3. Define a <mx:ColumnChart id="column" ...> in a Flex4 skin.
    4. Got this compiler error. 
    Any idea if this is not supposed to work? I'm hoping I don't need all referenced swcs to be recompiled with Flex4 SDK. Some of those are external dependency that I do not have source code access.
    Thanks for any help.
    kam

  • [svn:fx-trunk] 8303: This change tries to support legacy usages of StyleManager. setStyleDeclaration() while keeping the new "subject based" internal index of style declarations in sync with selectors.

    Revision: 8303
    Author:   [email protected]
    Date:     2009-06-26 07:50:46 -0700 (Fri, 26 Jun 2009)
    Log Message:
    This change tries to support legacy usages of StyleManager.setStyleDeclaration() while keeping the new "subject based" internal index of style declarations in sync with selectors. We no longer support the invalid usage of constructing a CSSStyleDeclaration with one selector but re-registering it with StyleManager.setStyleDeclaration with another selector.
    QE: Yes, look out for test cases that incorrectly create a CSSStyleDeclaration with a selector AND also use StyleManager.setStyleDeclaration(). I saw one invalid usage in the mustella test file: tests/Managers/StyleManager/AdvancedCSS/mixedSelectors/AdvancedCSS_MixedSelectors, specifically the "CSSStyleDeclaration_CSSSelectorKind_Type_method" test case.
    Doc: Yes, please remove any examples that showed a CSSStyleDeclaration being constructed with a "name" as that is incorrect. You only construct these instances with a selector, or nothing.
    Reviewer: Glenn
    Checkintests: Pass
    Bugs:
    SDK-21714 - Dynamically created styles are ignored by spark components
    Ticket Links:
        http://bugs.adobe.com/jira/browse/SDK-21714
    Modified Paths:
        flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/StyleManagerImpl.as

    Hi,
    Found a note explaining the significance of these errors.
    It says:
    "NZE-28862: SSL connection failed
    Cause: This error occurred because the peer closed the connection.
    Action: Enable Oracle Net tracing on both sides and examine the trace output. Contact Oracle Customer support with the trace output."
    For further details you may refer the Note: 244527.1 - Explanation of "SSL call to NZ function nzos_Handshake failed" error codes
    Thanks & Regards,
    Sindhiya V.

  • [svn:fx-trunk] 11575: Put default style declarations into one class per application or module.

    Revision: 11575
    Author:   [email protected]
    Date:     2009-11-09 11:34:57 -0800 (Mon, 09 Nov 2009)
    Log Message:
    Put default style declarations into one class per application or module.
    Generate all the default styles in one class instead of a class for each style. The name of the style class will be based on the application or module name. An application named ?\226?\128?\156foo?\226?\128?\157 will have a style class named ?\226?\128?\156_foo_Style?\226?\128?\157. The idea is to allow applications to be compiled with different themes and get their owns styles. Currently this is not possible because a global style in both themes will have the same class name, _globalStyle. Whatever class the top-level application loads the sub-applications and modules will have to use the same class because of the flash player first-class-in-wins rule. Now each application and module will have their own style class.
    QE notes: None.
    Doc notes: None.
    Bugs: SDK-22454
    Reviewer: Paul, Pete
    Tests run: checkintests, all mustella tests.
    Is noteworthy for integration: No.
    Ticket Links:
        http://bugs.adobe.com/jira/browse/SDK-22454
    Modified Paths:
        flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/css/StyleDef.vm
        flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/css/StylesContainer.java
        flex/sdk/trunk/modules/compiler/src/java/flex2/tools/PreLink.java

    Revision: 11575
    Author:   [email protected]
    Date:     2009-11-09 11:34:57 -0800 (Mon, 09 Nov 2009)
    Log Message:
    Put default style declarations into one class per application or module.
    Generate all the default styles in one class instead of a class for each style. The name of the style class will be based on the application or module name. An application named ?\226?\128?\156foo?\226?\128?\157 will have a style class named ?\226?\128?\156_foo_Style?\226?\128?\157. The idea is to allow applications to be compiled with different themes and get their owns styles. Currently this is not possible because a global style in both themes will have the same class name, _globalStyle. Whatever class the top-level application loads the sub-applications and modules will have to use the same class because of the flash player first-class-in-wins rule. Now each application and module will have their own style class.
    QE notes: None.
    Doc notes: None.
    Bugs: SDK-22454
    Reviewer: Paul, Pete
    Tests run: checkintests, all mustella tests.
    Is noteworthy for integration: No.
    Ticket Links:
        http://bugs.adobe.com/jira/browse/SDK-22454
    Modified Paths:
        flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/css/StyleDef.vm
        flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/css/StylesContainer.java
        flex/sdk/trunk/modules/compiler/src/java/flex2/tools/PreLink.java

  • Style declaration in mobile app problems (not working)

    Hello,
    In a simple mobile Flex app, I have a simple View that has a styleName assigned to a VGroup within it. The decleration is within the same view (for sake of trying to make this work, but it's in an external css if I figure out a way to make this work).
    The padding's I'm assigning are just NOT working at all. Nothing. While if I specify in the VGroup directly it's paddingTop or another style, it works fine
    Weird behavior.
    Here's the View:
    <?xml version="1.0" encoding="utf-8"?>
    <s:View xmlns:fx="http://ns.adobe.com/mxml/2009"
            xmlns:s="library://ns.adobe.com/flex/spark" title="HomeView">
        <fx:Declarations>
            <!-- Place non-visual elements (e.g., services, value objects) here -->
        </fx:Declarations>
        <fx:Style>
            .myGroup {
                paddingTop:200;
                paddingLeft:300;
                paddingRight:30;
        </fx:Style>
        <s:VGroup styleName="myGroup">
            <s:Label text="Hello" />
        </s:VGroup>
    </s:View>
    Anyone have an idea why ?
    I'm using Flex 4.6/AIR 3.6 at the moment, tried it with Flex 4.9.1/AIR 3.4 too, same behavior.
    Is this a bug ? Am I doing something wrong ? Is there a hack/trick to make this work other than specifying the styles directly in the MXML ?
    Thanks.

    Just realized that the paddings in the VGroup aren't styles anymore but are properties. Damn those spark components
    I guess that's why, and I find it's a bummer. I know I could hack this, but damn me!

  • [svn:fx-trunk] 10607: Moved the 'breakOpportunity' style from BasicInheritingTextStyles.as to AdvancedInheritingTextStyles.as , so it is declared on fewer components now.

    Revision: 10607
    Author:   [email protected]
    Date:     2009-09-25 16:08:48 -0700 (Fri, 25 Sep 2009)
    Log Message:
    Moved the 'breakOpportunity' style from BasicInheritingTextStyles.as to AdvancedInheritingTextStyles.as, so it is declared on fewer components now. As far as I can tell, it is mainly useful in rich text.
    QE notes: None
    Doc notes: None
    Bugs: SDK-22474
    Reviewer: Ryan
    Tests run: ant checkintests
    Is noteworthy for integration: No
    Ticket Links:
        http://bugs.adobe.com/jira/browse/SDK-22474
    Modified Paths:
        flex/sdk/trunk/frameworks/projects/spark/src/spark/components/Label.as
        flex/sdk/trunk/frameworks/projects/spark/src/spark/styles/metadata/AdvancedInheritingText Styles.as
        flex/sdk/trunk/frameworks/projects/spark/src/spark/styles/metadata/BasicInheritingTextSty les.as

    Gordon, it looks like its been a while since you made this post.  Not sure how valid it is now...   I am particularly interested in the LigatureLevel.NONE value.  It seems that it is no longer supported.
    How do I turn of ligatures in the font rendering?
    My flex project involves trying to match the font rendering of Apache's Batik rendering of SVG and ligatures have been turned off in that codebase.  Is there any way (even roundabout) to turn ligatures off in flash?
    Thanks,
    Om

  • [svn:fx-trunk] 10893: The 'lineBreak' style is now properly declared as non-inheriting.

    Revision: 10893
    Author:   [email protected]
    Date:     2009-10-06 10:16:37 -0700 (Tue, 06 Oct 2009)
    Log Message:
    The 'lineBreak' style is now properly declared as non-inheriting.
    For a long time we've intended for it to be non-inheriting... it lives in BasicNonInheritingStyles.as! And we want it to be non-inheriting, because in TLF this format does not inherit from parent FlowElement to child FlowElement, so in Flex is should not inherit from parent UIComponent to child UIComponent. But the metadata incorrectly said inherit="yes". It now correctly says inherit="no".
    QE notes: Please be on the lookup for mustella breakage.
    Doc notes: None
    Bugs: SDK-23569
    Reviewer: Ryan
    Tests run: ant checkintests
    Is noteworthy for integration: Yes
    Ticket Links:
        http://bugs.adobe.com/jira/browse/SDK-23569
    Modified Paths:
        flex/sdk/trunk/frameworks/projects/spark/src/spark/styles/metadata/BasicNonInheritingText Styles.as

    Gordon, it looks like its been a while since you made this post.  Not sure how valid it is now...   I am particularly interested in the LigatureLevel.NONE value.  It seems that it is no longer supported.
    How do I turn of ligatures in the font rendering?
    My flex project involves trying to match the font rendering of Apache's Batik rendering of SVG and ligatures have been turned off in that codebase.  Is there any way (even roundabout) to turn ligatures off in flash?
    Thanks,
    Om

  • Question Re: Color Codes/Component Style Declaration

    I am not understanding the use of hexidecimal color codes for
    component styles. What is the "0x" for? This is not addressed in
    flash help. What I am trying to figure out is if I can specify
    alpha transparency with style declaration and I'm wondering if the
    seemingly superfluous prefix may have something to do with it.
    Either way I'd at least like to know what it means.
    Thanks in advance,
    JeevesQuimby

    JQ you could actually pass that number in decimal value or
    string. example:
    //blue
    myTextArea.setStyle( "backgroundColor", "blue" );
    // red
    myTextArea.setStyle( "backgroundColor", 0xFF0000 );
    // green
    myTextArea.setStyle( "backgroundColor", 65280 );
    the real color number is actually the decimal number, but
    when ported to an
    hexadecimal system it's just easier to use... Check the doc
    on getPixel32 in
    flash, on top of RGB values you also have alpha values, which
    gives a number
    like 0xAARRGGBB
    JG
    "JeevesQuimby" <[email protected]> wrote in
    message
    news:ejntk8$74h$[email protected]..
    >I understand hex codes, it just seems to me that if
    you're specifying a
    >color
    > as in: TextArea.setStyle("backgroundColor", 0xFFFFFF);
    flash would be
    > expecting
    > the color code, so the 0x seems unnecessary, since it is
    always the same.
    > Any
    > other program identifies the color with just 6
    characters. What would
    > happen if
    > I were to put 2xFFFFFF for example? It just seems wierd
    to me. Thanks
    > anyways
    > though.
    > JQ
    >
    >
    >

Maybe you are looking for

  • Dvd drive won't work!

    Whenever I try to go to apple cd player, a window pops up and tells me that the "apple cd/dvd driver is not in the extensions folder. So I put it in the folder and it still gives me the same message.

  • SAP R/3 4.6B Unix Oracle 8.0.6 ERROR

    Hi Folks, Im installing SAP 4.6B on Unix with oracle 8.0.6 --> This is the 1st part of the upgrade project... I started SAP Installation, then I installed Oracle. Upto this point everything was OK. Then when I went back to SAP installation I get the

  • Temporary table refresh problem

    Hi, I running a process before validation on a page to populate a temporary table when I click a button. On the following page I've built a shuttle on the temporary table. Not the most elegant solution, but the shuttle LOV box wouldn't process the or

  • Problem in synchronizing two executions

    One execution (not in loop structure) is to run vi-A to move a motor by certain distance. Another execution is a loop struction, and in each loop execution vi-B inside it acquires current motor position. I hope to synchronize this two executions so t

  • Power adapter male pin BROKEN

    My son called today with power adapter problems...took awhile for me to figure it out, but the tip of the adapter pin has apparently broken off inside the computers female power port. (the pin is flush with the metal collar while it protrudes about 1