Max Titov IV @ TechSplice

The most beautiful music of all is the music of what happens.
  • Home
  • About

Posts Tagged ‘programming’

15 Jul 2011

MXML: “true && true” error

Stumbled across this strange error while doing some development.  I’ve needed to determine the enable function of a button based on two boolean conditions and as a result created the following bit of code:

<com:Component enabled=”{booleanA && booleanB}”/>

The compiler didn’t like what I’ve put together and threw the following error: The entity name must immediately follow the ‘&’ in the entity reference.

At first I litteraly thought that I’ve forgotten how to code and trivially tried a simple if statement in a <fx:Script> tag – that worked without a problem.  I’ve also tried to see if the or ”||” operator worked within the enabled attribute – which it did. My last thought before searching for a solution online was that the latest version of Adobe Flex had a bug in it.

Some of the solution that I’ve discovered are:

  • use ;&amp instead
  • use (booleanA) ? (booleanB):false
  • use !(!active1 || !active2)
I found the third option to be quite amusing though in general the root cause of the problem is the XML parsing of the MXML code.  Once you understand it should be straight forward.
15 July, 2011 at 14:39 by maxtmax

Tags: coding, Flex, programming
Posted in Flex | Comments Off

21 Jan 2011

SAP: ABAP: Subroutine does not exist – bug

Scenario: you’re editing your code and when you try to double click on a previously defined subroutine you get a popup stating that it doesn’t exist. You check and confirm that the subroutine is included, the report compiles and runs properly.

Resolution: to fix the problem do the following steps:

  1. Click Utilities
  2. Click Update Navigation Index

The report will be regenerated and your problem should be solved.

21 January, 2011 at 15:18 by maxtmax

Tags: abap, bugs, programming, sap
Posted in SAP/ABAP | No Comments »

16 Jan 2011

Adobe Flex: smooth out the images – scaleContent

When you’re dealing with a situation that requires the use of the following image settings:

width="100%"
height="100%"
scaleContent="true"
maintainAspectRatio="true"

You can find your self in a situation where the loaded content will result in a pixelated bitmap.  Simply add a complete event handler to your image component and update the contents of the event in the following way:

var lv_btmp:Bitmap = ((event.target as Image).content as Bitmap);
if ( lv_btmp != null )
lv_btmp.smoothing = true;

this will smooth out the image that you have loaded.

16 January, 2011 at 23:12 by maxtmax

Tags: adobe, Flex, programming
Posted in Flex | No Comments »

14 Dec 2010

ABAP: link company code and controlling area

Quick way to find a controlling area derived from the company code is to use the following BAPI_CONTROLLINGAREA_FIND.  Examining further you will see that there is a reference to table TKA02 with parameters of company code and business area.

14 December, 2010 at 13:54 by maxtmax

Tags: programming, SAP/ABAP
Posted in SAP/ABAP | No Comments »

13 Dec 2010

ABAP: how to switch to a classic screen painter [4.6C]

Simple: select Utilities and navigate to the Screen Painter tab.   There you will see a check box corresponding to the desired action.

13 December, 2010 at 22:34 by maxtmax

Tags: abap, programming
Posted in SAP/ABAP | No Comments »

28 Nov 2010

FLEX: convert HTML format to RichText

If you are working with rich text editors you will run in to a situation where you have to format an HTML string to RichText value.

Following code can accomplish this:

gc_ta_bio.textFlow =
TextConverter.importToFlow( "<h1>Your String</h1>,
TextConverter.TEXT_FIELD_HTML_FORMAT )

Where the MXML control will look something like this:

<s:RichEditableText id="gc_ta_bio" />
28 November, 2010 at 21:28 by maxtmax

Tags: actionscript, Flex, programming
Posted in Flex | No Comments »

22 Nov 2010

SAP: ABAP: ALV grid color scheme

Here’s a list of colors that you can use to color your ALV grid.

To actually use create a field of 4 characters and use ‘CX00′ where X is the number specified above.

22 November, 2010 at 21:23 by maxtmax

Tags: programming, SAP/ABAP
Posted in SAP/ABAP | No Comments »

22 Nov 2010

SAP: transport classes

If you know how to transport copies of objects then you are half way there.  So a quick and easy way to figure out what to put in to your transport [Change Object List] perform the following steps:

  • go to SE24
  • type in your class name
  • click Goto – Object Directory Entry

At this point you should see your object definition entries: R3TR – CLAS – <CLASS NAME>. Grab that and move your transport.

22 November, 2010 at 16:21 by maxtmax

Tags: abap, programming, SAP/ABAP
Posted in Everyday stuff | No Comments »

20 Nov 2010

SAP: Generating a Class Actor – CREATE_PERSISTENT

Been playing with the persistent objects and finally figured a part that involves generating a CREATE_PERSISTENT method in the Base agent class.

To do this

  1. Go to Persistence Representation
  2. Select Utilities – Generate – Class Agent – Class
  3. Click the Yes button

That’s all.

20 November, 2010 at 11:29 by maxtmax

Tags: abap, programming, SAP/ABAP
Posted in SAP/ABAP | No Comments »

18 Oct 2010

Flash Cross-Domain policies

A nice introduction to what the cross-domain policy are all about

18 October, 2010 at 16:39 by maxtmax

Tags: cross domain, flash, policy, programming, share
Posted in Flex | No Comments »

« Older Entries
  • Subscribe using FeedBurner
  • Cloud Data

    abap adobe animation basic beautiful builder camera code configuration contribution design development digital engineering fix flash Flex function images interesting lesson new paypal Photography php problem problems program programmer programming review sap SAP/ABAP sdk setup soap software solution story system tables transaction transports user video

    WP Cumulus Flash tag cloud by Roy Tanck and Luke Morton requires Flash Player 9 or better.

  • My Links

    • Cooking
    • Gallery
    • Resume
  • Online Tools

    • Airline Ticket Search
    • Estimate Shipping Cost [from US]
    • Link your Blog
  • Software Engineering Blogs

    • Adam Goucher
    • Joel on Software
    • The Third Bit
    • Wide Awake Developers
  • Categories

    • Everyday stuff
    • Flex
    • Photography
    • SAP/ABAP
    • Short Stories
    • Software Engineering
    • Web Development
  • Gallery

    Roy Tanck's Flickr Widget requires Flash Player 9 or better.

Max Titov IV @ TechSplice is proudly powered by WordPress
Design & code by Jonk
Entries (RSS) and Comments (RSS).