Flex :: Where Does The "newline" () Come From (pattern Matching Using "flex")

Feb 7, 2011

I have an experimental flex source file(lex.l):

%option noyywrap
%{
int chars = 0;
int words = 0;[code]....

Since there is no newline character in the input file, why the " in lex.l is pattern matched? (The "lines" is supposed to be 0, and the "chars" is supposed to be 9)(I am using OS X.)

View 1 Replies


Similar Posts:


ActionScript 3.0 :: Flash Matching Pattern Algorithm

Dec 2, 2010

[Code]...

Is there a way to do this with RegExp maybe? I know that I could just add each variation of each pattern to the array, and just search it, but I want to do it more intelligently.

View 4 Replies

Flex :: Adding Newline To String Text?

Jun 22, 2010

I want to add a newline to a string text and I was wondering if there is a newline constant in actionscript 3? For example in .net there is an Environment.NewLine that is a string, containing "
" for non-Unix platforms, or a string containing "
" for Unix platforms.

View 6 Replies

Flex :: Highlight Matching Text?

Aug 14, 2010

I have flex 4 and writing my own autocomplete component (based on the popupanchor) to search for different books. In the dropdown box, how can I highlight the text that matches? For instance, a user types in "ema" and the search returns "Pet Sematary"....I want to highlight the letters "ema" within "Pet Sematary"

View 1 Replies

Regex :: Flex - Matching Strings That Begin And End With The Same Character

Oct 28, 2009

I need to match a string that begins and ends with the same character in flex...I know the long hand way (RE being - "a[^(a")]a" | "b[^(b")b" | etc...), but I'm positive this isn't what I'm required to do (midterm tomorrow!);

I need to do this in flex, but if you can think of a short regex for it, I may be able to convert it to flex notation.

What I was thinking of was something along the lines of -

%%
int firstChar;
%x string;
%%

[Code].....

But this bugs me in a few ways, first, having that variable makes this not a regular language; second, I don't know if you can even use a variable to in a pattern match; and third, I don't know how NOT to match it, if it's just a normal string. And third, I don't know how to return everything that's been matched while in 'string'

View 2 Replies

Regex :: Matching Parentheses In Flex To Save Life

Sep 3, 2010

For some reason I can't seem to match a parentheses in Flex using Regex to save my life. What's wrong with this?

var commandTxt:String = "switchview(adf)";
var switchViewArray:Array = commandTxt.match(new RegExp("switchview(", "i"));

I've tried dozens of things, but I can't seem to get a match the parentheses. What's the catch here?

View 1 Replies

Flex :: List Dataprovider Based On Matching Attribute

Jan 27, 2012

I have some xml, I want to give it to a List dataprovider, but based on an attribute match.

My Xml

<components>
<rows name="general">
<objects name="Start" image16="startflag16" image32="startflag32" class="someclass">

[Code].....

And I am trying to do something like below, If I remove (@name=="general") from below line it gives me all property

listView.dataProvider=list_components.rows(@name=="general").objects.property;

But it gives me error, so basically I want to get all property based on rows attribute name matching general

View 1 Replies

Flex :: Last Occurrence Of String Pattern

Aug 9, 2010

Is there any inbuild function to find out the last occurrence of a string pattern in a string in actionscript.

View 1 Replies

Flex :: Splitting Text By Newline Character "" In Adobe AIR?

Aug 2, 2010

I am creating a AIR application in flex. I have a textArea having a string something likAAA BBB CCC DDDQQQ WWW EEE SSSKKPPP SSSL AAASI want this to save this into .txt file. I am using - file.save(output.text,"testFile.txt");But its is saving everything in 1 line. When I open the file using notepad everything is coming as Single line.Does flex provide any functionality using which I can save the contents of multiline Text Area into .txt file?The output string has got the '' but notepad is not able to recognize it. Is it a Flex issue or Windows notepad issue? If it is notepad issue then is there any way to work around this from Flex file io?

View 2 Replies

Regex :: Replace Contiguous Line Feeds Or New Line Characters With A Single Newline In Flex

Dec 26, 2011

I need to replace multiple contiguous new line/line feed characters in flex with a single new line character.

Example:

The string

"My name is blah blah

My name is blah
"

Should be converted to

"My name is blah blah
My name is blah
"

Hope the example makes it easier to understand.

I am using a component to render it.

I guess using regex would be the easiest way to do this, but still it would be great if people can point me out to references/examples to get this done with ease.

I am using flex 4.5.

View 2 Replies

Flex :: Parse String Pattern Into Date?

Dec 22, 2009

Is there some way in flex to parse strings to date. I want it to support custom formats similar to 'dateformatter'. Using 'dateformatter' class we can parse date object in various string formats as specified by 'formatString property'. I want it other way round, from string to date. The parse method 'Date.parse(my_string)' does string parsing but for a very limited set of formats. Can't we have something similar to following, where user can specify his/her own formats.

someformatter.formatString = 'HH::MM::SS' ;
mydate = someformatter.formatTodate('23::56:34');

Will 'parseDateString' method of dateformatter be useul here?

View 1 Replies

Flex :: Project Doing In Mvc Pattern Using Cairngorm Framework?

Jun 17, 2010

I wish to do my project in mvc pattern. so I chose cairngorm framework and just read some of the document about this framework.But I cant understand deeply to do project using this framework. Have any methods or examples to study doing project in cairngorm framework??

View 1 Replies

Flex :: Actionscript - DataGrid And The Command Pattern?

Mar 30, 2011

I am using a command pattern, so any changes to object state need to happen within a command execution. A normal itemeditor in a DataGrid would just make its changes on the underlying bound object, but I need to intercept that change and make it use a command.how to implement this. A basic example is that I have an object with a "date" field. In the datagrid I am using a flex "DateField" component as the itemeditor. When I select a new date, I don't want it to update the datasource, I want it to call a different method where I can access the newly selected value and pass it to a command to execute.

View 2 Replies

Flex :: Ambiguous Reference When Using The CodeBehind Pattern

Apr 2, 2011

I'm getting the ambiguous reference error when trying to bind properties. Here's the code:

[Code]...

Strangely enough, it doesn't even mention the binded property...

View 2 Replies

Flex :: Implementation Of Value Object Design Pattern?

Jun 20, 2011

I am just looking design patterns used in Flex. Any value object design pattern and how is it implemented in Flex.

View 3 Replies

Flex - Cairngorm Model Locator Pattern?

Jul 5, 2011

In Cairngorm (Flex Framework), there is Model Locator Pattern, which is similar to Global variables, is it a right pattern, Adobe is saying for flex its best pattern

[Code]...

View 1 Replies

Actionscript :: Google Maps - Flex Multiple Markers Not Matching Tooltip Or Lat Lng?

Dec 17, 2011

I had this same issue when I created an application using google's javascript API and the solution was to have closure on the callback function creating the multiple markers.I can not seem to find an example for making multiple custom markers, with anything other than using some random math function to create the multiple markers.

GlobalVars is a class that contains static public var types to keep up with however many addressess, lats, lngs, etc...I have tried using markermanager but it has some issues that I finally just gave up on. Starting with

retrieveLatLngAddress.addEventListener(GeocodingEvent.GEOCODING_SUCCESS, function(event:GeocodingEvent):void{

This is where I begin geocoding by address, rather than using an httpservice, as I was doing before, but I ran into issues of one httpservice result would return faster than another, which would in turn place the wrong data with the wrong marker.

Obviously, I have not found a solution, because this way is doing the same thing.Question being, how can I retrieve multiple markers info and keep all the markeroptions in order with the information being returned.

Here's the code:

public function makeMultipleMarkers(destinationAllObj:Object):void {
removeRouteMarkers();
myMarkers = [];
GlobalVars.myIcon = [];

[code]....

View 1 Replies

Flex :: Transform Regexp Pattern Match To Lowercase?

Mar 27, 2010

is it possible to transform regexp pattern match to lowercase?

var pattern:RegExp;
var str:String = "HI guys";
pattern = /([A-Z]+)/g;
str = str.replace(pattern, thisShouldBeLowerCase);

Output should look like this: "hi guys"

View 5 Replies

Flash :: Filling Flex Application Background With Pattern?

Aug 17, 2010

We are trying to fill our Flex 3 applications background with an image pattern by repeating the pattern throughout the background.

The pattern is a very small "bulleted"-background.

The Flex App seems to just stretch the image pattern even though we've specified in the CSS the following:

Application
{
background-gradient-colors: #ffffff, #ffffff;
color: #000000;

[Code]....

View 1 Replies

Actionscript :: NumberFormatter In Flex That Accept Pattern As A Parameter

Jun 28, 2011

I need to write a method doing a formatting of numeric value given a pattern as one of the parameter, in actionscript.

For example:

a. 12345.00 using format pattern ###,###.## resulting 12,345.00
b. 12345.00 using format pattern ##,##,##.## resulting 1,23,45.00

Initially, I thought that NumberFormatter able to do that, but after reading documentation, it seems you are not able to accept pattern.

how to implement this ? I'm using Flex 4.1

UPDATE: I made an advanced formatter based on the sample created by Jason. You can download it here : link

View 2 Replies

Flex :: Implementing A MVC Pattern Without A Framework, Should Httpservice Be In The Model Or The Controller?

Jul 1, 2011

I would like to implement the MVC pattern to an existing Flex project.I want to separate out the controllers and models from the views. They currently all live together in large mxml files.My question is, should httpservice requests be in the model or the controller? What sort of advantages/disadvantages would there be to either?

View 3 Replies

Java :: Hibernate And Servlets With Adobe Flex + Model View Controller Pattern?

Aug 30, 2010

I am preparing a document for a project. The project's backend is developed in Java, frontend is adobe flex.
I am not sure about the correct way of describe the project in Model-View-Controller way.

For Model layer: Using Hibernate Java beans to implement all the business logic and persistence? For View Layer: Using Adobe flex send post or get request to Controller layer, and get respond in XML format. For Controller Layer: Using Java servlet to handle requests from Flex client?

View 2 Replies

Regex :: Need Regular Expression Pattern For Validating Path Directory Structure In Flex?

Aug 10, 2011

I need a regular expression pattern for validating the following path directory:

[Code]...

View 1 Replies

ActionScript 3.0 :: Search A String For A Particular Pattern, And Replace It With Elements From Within The Pattern?

Nov 25, 2009

i'm trying to search a string for a particular pattern, and replace it with elements from within the pattern... for example..here's the given string...if you want to learn how to use regexp, {url===http://somesite.com, text===click here}.

the pattern...
{url===http://somesite.com, text===replacement text}

and the intended result...
if you want to learn how to use regexp, click here.

of course, i'll extract the url and do something else with it... i'm just wondering what the regexp is for that pattern, and how i can extract things from the results returned.

View 5 Replies

Flex :: Presentation Model Pattern Can View Specific Logic Reside In View?

Aug 15, 2011

I'm currently using RobotLegs with the Presentation Model pattern to develop a Flex 4 project. I understand that all business logic related to a View resides in the Presentation Model associated with that view, however, I am confused when it comes to View specific logic.For example, I have an indicator that needs to be positioned relatively to list items depending on which list item is selected. Is it acceptable in the Presentation pattern to put the logic that will position the indicator in the View and simply have that logic run in reaction to a selectedIndex property changing in the presentation model?The reason I am considering this is that since the Presentation Model does not have a reference to the view it is difficult to come up with an ideal solution for manipulating view components.

View 1 Replies

Actionscript 3 :: Write "Intercepting Filter Pattern" Like Java's Servlet Filter In Flex?

Feb 10, 2011

I want to know how to write "Intercepting Filter Pattern" like Java's servlet filter in Flex.

And I want to insert it into the classes which have a role of server communicating.

View 1 Replies

ActionScript 3.0 :: Newline - Use Tab Spacing?

Jun 27, 2011

In AS3, we can format textfield to a newline by using . And now I'm trying to find out how do I use tab spacing in AS3? I want to format my textfield to look like this:

[Code]...

View 3 Replies

ActionScript 3.0 :: Insert Newline Into Mailto?

Sep 3, 2008

I using AS3 to create a mailto: link from within an swf.[code]...

View 1 Replies

ActionScript 3.0 :: CS4 Newline Doesn't Work

Feb 7, 2010

This works: (ta is a textarea)
 
var il:XMLList = xml.channel.item; var spectacle1:String = il.title.text()[0];var spectacle2:String = il.title.text()[1];ta.text = (spectacle1+spectacle2);
// outpout content1content2
 
This not!
 
var il:XMLList = xml.channel.item;var spectacle1:String = il.title.text()[0];var spectacle2:String = il.title.text()[1];ta.text = (spectacle1+newline+spectacle2);

View 2 Replies

Html :: Newline Automatically Entered After Css Tag?

Jun 27, 2011

I am rendering a TextField (Flash CS5) with the following css and html properties :

css = "a {font-weight: bold;} fu {color: #00A0A0;}"
wordWrap = true
multiline = true
html = <![CDATA["Phoenicians were pioneering artisans and ingenious craftsmen...

They developed the technique behind the production of transparent glass...

Their innovation spread around the globe throughout the past centuries...

<fu>WE AIM TO CARRY ON WITH THE INNOVATION</fu>"]]>

The last QUOTE is rendered in a line BELOW "WE AIM TO...". It's rendered like this :

WE AIM TO CARRY ON WITH THE INNOVATION

The ONLY way to render the quote in the same line with "WE AIM..." is to :

a) Either put it INSIDE <fu>

b) Or remove <fu> altogether.

Is this a Flash bug? Am I doing something wrong with css or html?

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved