[flexcoders] Re: Need help Combobox label property

2009-07-29 Thread gan_sun2006
Thanks to everyone for suggestions.

I am having a combo in which the values are dynamically coming from DB thru 
java WS. The case is, when i select a country for instance say India, the 
code for the corresponding selection IN is saved to the DB thru java WS 
during SAVE action. When i retrieve the value in future, I am given only the 
countrycode IN. Using this code, I have to show the countryname on label 
property of my combo. I am currently looping thru the arraycol(dataprovider) 
for checking the code for IN and setting the arraycol index to 
combo.selectedIndex. I cannot use switch() here as the values are dynamic from 
DB.

Is there any other better way of doing this...?

Thanks in advance!!!

Regards,
Ganesh Sundar R.


--- In flexcoders@yahoogroups.com, Jeffry Houser j...@... wrote:

 
  I started to give him a similar answer, but then realized he may be 
 talking about setting the selectedItem on the ComboBox.  He mentioned he 
 already had a labelField which seems to be exactly what he needs for 
 display purposes without a complicated switch statement. 
 
  Ganesh, if neither answer helps you, could you elaborate on the problem?
 
 Mark Lapasa wrote:
   
 
  look at combo boxes labelfunction
  the function will then inspect the countrycode and you'll have a nasty
  switch statement that will output the correct country name
 
  -mL
 
  gan_sun2006 wrote:
  
  
   Hi,
  
   I am using combobox for which the bound data is coming from an
   arraycollection. My arraycollection has two properties called
   countryname(labelField) and countrycode. When i submit my page, the
   countrycode from my combo is saved to the DB. During retrieval I am
   given only countrycode and not countryname.
  
   How can I show the equivalent countryname as selectedItem in my
   combobox? Presently I am looping through the arraycollection and
   showing the equivalent countyname. Is there any other way to do it?
  
   Any help is highly appreciated...
  
   Regards,
   Ganesh Sundar R.
  
  
 
  Notice of confidentiality:
  The information contained in this e-mail is intended only for the use 
  of the individual or entity named above and may be confidential. 
  Should the reader of this message not be the intended recipient, you 
  are hereby notified that any unauthorized dissemination, distribution 
  or reproduction of this message is strictly prohibited. If you have 
  received this message in error, please advise the sender immediately 
  and destroy the e-mail.
 
  
 
 -- 
 Jeffry Houser, Technical Entrepreneur
 Adobe Community Expert: http://tinyurl.com/684b5h
 http://www.twitter.com/reboog711  | Phone: 203-379-0773
 --
 Easy to use Interface Components for Flex Developers
 http://www.flextras.com?c=104
 --
 http://www.theflexshow.com
 http://www.jeffryhouser.com
 --
 Part of the DotComIt Brain Trust





[flexcoders] advanced datagrid refresh

2009-07-29 Thread awesome

When I press delete I need to refresh  datagrid to display changes. Currently
it displays changes only when I reload the page.

I tried getAllItemsCollection.refresh(); but it only collapses grouping and
does not display changes.

For testing purposes I created delete button and tried everything from
invalidatedisplaylist to reassigning dataprovider but with no luck.

Any help would be appreciated.

My code:

?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=vertical
minWidth=1024 minHeight=768
xmlns:izdelkiservice=services.izdelkiservice.*
mx:Script
![CDATA[
import mx.events.AdvancedDataGridEvent;
import mx.controls.dataGridClasses.DataGridColumn;
import mx.controls.DataGrid;
import mx.events.DataGridEvent;
import mx.messaging.AbstractConsumer;
import mx.utils.ObjectUtil;
import mx.events.FlexEvent;
import mx.controls.Alert;

public var clickedColumn:String;

protected function 
adg_creationCompleteHandler(event:FlexEvent):void
{
getAllItemsResult.token = 
izdelkiService.getAllItems();
}

protected function 
button_clickHandler(event:MouseEvent):void
{
createItemResult.token = 
izdelkiService.createItem(izdelek);
}

protected function 
updateBtn_clickHandler(event:MouseEvent):void
{
updateItemResult.token = 
izdelkiService.updateItem(izdelek2);
}

protected function 
deleteBtn_clickHandler(event:MouseEvent):void
{
deleteItemResult.token = 
izdelkiService.deleteItem(izdelek2.id);
getAllItemsCollection.refresh();
adg.dataProvider = adg.dataProvider;
}

private var _dataField:String;

private function
adg_headerReleaseHandler(event:AdvancedDataGridEvent):void
{
clickedColumn = event.dataField;
}

private function sortNumeric(obj1:Object, 
obj2:Object):int
{
return
ObjectUtil.numericCompare(obj1[clickedColumn],obj2[clickedColumn]); 

}

private function sortKat(obj1:Object, obj2:Object):int
{
return 
ObjectUtil.numericCompare(obj1.kat,obj2.kat);
}

protected function 
refreshBtn_clickHandler(event:MouseEvent):void
{
adg.dataProvider = null;
adg.dataProvider = {getAllItemsCollection};
getAllItemsCollection.refresh();
adg.validateDisplayList();
adg.validateNow();
adg.invalidateDisplayList();
adg.invalidateList();   
}
]]
/mx:Script
mx:AdvancedDataGrid id=adg designViewDataType=tree width=100% 
creationComplete=adg_creationCompleteHandler(event) 
editable=false 
dataProvider={getAllItemsCollection} height=50%
headerRelease=adg_headerReleaseHandler(event)
mx:columns
mx:AdvancedDataGridColumn headerText=id 
dataField=id
editable=false sortCompareFunction=sortNumeric/
mx:AdvancedDataGridColumn headerText=izdelek 
dataField=izdelek/
mx:AdvancedDataGridColumn headerText=ime 
dataField=ime/
mx:AdvancedDataGridColumn headerText=kat 
dataField=kat
sortCompareFunction=sortNumeric/
mx:AdvancedDataGridColumn headerText=opis 
dataField=opis/
mx:AdvancedDataGridColumn headerText=datum 
dataField=datum/
mx:AdvancedDataGridColumn headerText=vrstni_red 
dataField=vrstni_red
sortCompareFunction=sortNumeric/
/mx:columns
/mx:AdvancedDataGrid
mx:CallResponder id=getAllItemsResult
result=getAllItemsCollection.refresh();/
izdelkiservice:IzdelkiService id=izdelkiService
destination=IzdelkiService

[flexcoders] Scrollbar intersection.

2009-07-29 Thread ivansebastiansurya
Hi everyone,

I'm just wondering if any of you guys have attempted to color the square that 
results as the intersection of the vertical and horizontal scroll bars.

I have a containers that have both scrollbars on, the ugly thing is that there 
is this white square at the bottom right corner of my container where the 
scrollbars intersect.

Is there a way to change the colour of that square?

Many thanks,

Ivan.



Re: [flexcoders] Flex Compilation takes long time

2009-07-29 Thread Alexander Tarelkin
I googled on the same subject literally a couple of weeks ago.
Here is the link that shed some light and helped me:
http://stackoverflow.com/questions/33768/any-advice-for-speeding-up-the-compile-time-in-flex-builder-3

What turned out relevant for our projects:
* Slow compile time is most often caused by having large numbers of embedded
resources ([Embed] or @Embed).
We have plenty of them, but the second tip helped much more.
* Go to Project-Properties-Flex Applications. All of the applications
listed are compiled each time.
This one is so evident but no one thought of that. We had 8 applications in
the project, but only two of them were required at a time.

On Wed, Jul 22, 2009 at 9:30 AM, ondemand_mayur ondemand_ma...@yahoo.comwrote:



 Hi folks,

 I have a project crated with Flex 3 ( SDK 3.2 ).
 When ever I compile it really takes much long time min 4 to 5 mins ( i.e.
 240 to 300 seconds).

 That really make my developers crazy and it is so frustrating.

 Has any one any suggestions how to make compilation process faster.

 * I have already set  -incremental=true  for flex compiler in Flex
 Builder 3.
 * I have around six diff. modules in my project. ( And I have noticed after
 modularization of my application it takes some more time for compilation I
 know that in the process - flex builder has to call another tool for module
 compilation other then MXMLC )

 I Need some tech. Tips and suggestions to reduce the time for compilation.

 Thanking you in advance.

 Mayur

  




-- 
Alexander Tarelkin
Web Developer
devexperts.com


[flexcoders] Re: AIR app, need MouseMove events NOT bounded by screen

2009-07-29 Thread valdhor
Just throwing out an idea ;-}

How about just keep on panning in the same direction when mouse move events 
stop (Maybe check the mouse X/Y position and do this if it's at the edge of the 
screen). When the user moves the mouse back into the screen bounds, you will 
start getting events again and can respond appropriately.


--- In flexcoders@yahoogroups.com, Tracy Spratt tr...@... wrote:

 I have tested with a joystick and it behaves the same as moving the mouse
 with no button pressed, and events stop at the screen boundaries.
 
  
 
 Tracy Spratt,
 
 Lariat Services, development services available
 
   _  
 
 From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
 Behalf Of Pedro Sena
 Sent: Tuesday, July 28, 2009 6:51 PM
 To: flexcoders@yahoogroups.com
 Subject: Re: [flexcoders] AIR app, need MouseMove events NOT bounded by
 screen
 
  
 
   
 
 Hi Tracy,
 
 The joystick will not trigger events like the keyboard arrows? I would
 expect it from a joystick
 
 Regards
 
 On Tue, Jul 28, 2009 at 7:16 PM, Tracy Spratt tr...@nts3rd.
 mailto:tr...@... com wrote:
 
   
 
 This AIR app is to be embedded in a consumer electronics product. It is a
 transparent UI that indirectly controls an underlying map application by
 sending messages via sockets.
 
 The product actually has a joystick and not a mouse and one requirement is
 that moving the joystick will cause the map to pan. 
 
 In development, using a real mouse, when the mouse pointer hits a screen
 boundary, MouseMove events are no longer dispatched in that direction. In a
 corner, all events cease. This is causing me problems with continuing to
 send messages to the application to continue panning.
 
 I am hoping the joystick will behave differently, but am also looking for
 any other suggestions. I have considered using a timer to send repeated
 increments (the back-end app only needs position deltas), but I haven't
 figured out how to stop that.
 
 As far as I can tell, there is no way to set the position of the system
 cursor. If I could reset the mouse x,y to some positive values when it
 approached an edge, that would work as well.
 
 Is there anyway I can get deeper into the mouse event? If I could get a
 generic moving event, that would also suffice.
 
 Any thoughts?
 
 Tracy Spratt
 
 
 
 
 -- 
 /**
 * Pedro Sena
 * Systems Architect
 * Sun Certified Java Programmer 
 * Sun Certified Web Component Developer
 */





Re: [flexcoders] Flex Compilation takes long time

2009-07-29 Thread Alexander Tarelkin
This link can be useful as well: http://hasseg.org/blog/?p=194

On Wed, Jul 22, 2009 at 9:30 AM, ondemand_mayur ondemand_ma...@yahoo.comwrote:



 Hi folks,

 I have a project crated with Flex 3 ( SDK 3.2 ).
 When ever I compile it really takes much long time min 4 to 5 mins ( i.e.
 240 to 300 seconds).

 That really make my developers crazy and it is so frustrating.

 Has any one any suggestions how to make compilation process faster.

 * I have already set  -incremental=true  for flex compiler in Flex
 Builder 3.
 * I have around six diff. modules in my project. ( And I have noticed after
 modularization of my application it takes some more time for compilation I
 know that in the process - flex builder has to call another tool for module
 compilation other then MXMLC )

 I Need some tech. Tips and suggestions to reduce the time for compilation.

 Thanking you in advance.

 Mayur

  




-- 
Alexander Tarelkin
Web Developer
devexperts.com


[flexcoders] Re:compc namespace issue gumbo.

2009-07-29 Thread Teoti Graphix, LLC
Hi,

This is what I use and I am compiling large component frameworks in 
nightly builds of Flex 4.

compc
output=${output.product.swc}
link-report=${basedir}/deployed/link-report.xml
   
target-player10/target-player
namespace
uri=http://www.teotigraphix.com;
manifest=${basedir}/build/component-manifest.xml/
   
namespace
uri=library://ns.adobe.com/flex/spark

manifest=${flexsdk.dir}/frameworks/projects/spark/manifest.xml/
   
include-namespaces uri=http://www.teotigraphix.com/
   
source-path path-element=${global.framework.src.dir}/
source-path path-element=${library.src.dir}/
   
external-library-path dir=${flexsdk.libs.dir}
include 
name=player/${version.player.major}/playerglobal.swc/
include name=framework.swc/
include name=flex4.swc/
include name=textLayout.swc/
/external-library-path
   
keep-as3-metadata name=ComponentAlias /
keep-as3-metadata name=ComponentHandler /
keep-as3-metadata name=SkinHandler /
keep-as3-metadata name=PartHandler /
keep-as3-metadata name=ServiceHandler /
keep-as3-metadata name=Part /
keep-as3-metadata name=StyleBinding /
   
/compc

 From what I see is you are missing the;

external-library-path/

element.

Mike,

http://www.teotigraphix.com


Re: [flexcoders] variables name are in array

2009-07-29 Thread Alexander Tarelkin
Where is the breaking condition in the loop?

On Wed, Jul 22, 2009 at 12:57 AM, markflex2007 markflex2...@yahoo.comwrote:



 I use a array to save variable names and other to save values,but why the
 following code doesn't work.please give me a idea.

 for(var i:int = 0;arrName.length; i++)
 {
 arrName[i] = arrValue[i];
 }

 Thanks a lot.

 Mark

  




-- 
Alexander Tarelkin
Web Developer
devexperts.com


RE: [flexcoders] Need help Combobox label property

2009-07-29 Thread Tracy Spratt
Use labelFunction, but an alternative to a switch statement would be to use
an associative array (Object).

 

Tracy Spratt,

Lariat Services, development services available

  _  

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Mark Lapasa
Sent: Tuesday, July 28, 2009 3:18 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Need help Combobox label property

 

  

look at combo boxes labelfunction
the function will then inspect the countrycode and you'll have a nasty 
switch statement that will output the correct country name

-mL

gan_sun2006 wrote:
 

 Hi,

 I am using combobox for which the bound data is coming from an 
 arraycollection. My arraycollection has two properties called 
 countryname(labelField) and countrycode. When i submit my page, the 
 countrycode from my combo is saved to the DB. During retrieval I am 
 given only countrycode and not countryname.

 How can I show the equivalent countryname as selectedItem in my 
 combobox? Presently I am looping through the arraycollection and 
 showing the equivalent countyname. Is there any other way to do it?

 Any help is highly appreciated...

 Regards,
 Ganesh Sundar R.

 

Notice of confidentiality:
The information contained in this e-mail is intended only for the use of the
individual or entity named above and may be confidential. Should the reader
of this message not be the intended recipient, you are hereby notified that
any unauthorized dissemination, distribution or reproduction of this message
is strictly prohibited. If you have received this message in error, please
advise the sender immediately and destroy the e-mail.





RE: [flexcoders] Re: AIR app, need MouseMove events NOT bounded by screen

2009-07-29 Thread Tracy Spratt
That is probably what I will implement if I can't find something better, but
I think the design folks will not like it since it will require the user to
move the joystick in the opposite direction to stop the map from panning
endlessly.

 

I am beginning to fear that I will have to push the cursor functionality on
the back-end application itself, where they can hopefully get lower level
access to the mouse/cursor/joystick driver

 

Tracy Spratt,

Lariat Services, development services available

  _  

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of valdhor
Sent: Wednesday, July 29, 2009 8:30 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: AIR app, need MouseMove events NOT bounded by
screen

 

  

Just throwing out an idea ;-}

How about just keep on panning in the same direction when mouse move events
stop (Maybe check the mouse X/Y position and do this if it's at the edge of
the screen). When the user moves the mouse back into the screen bounds, you
will start getting events again and can respond appropriately.

--- In flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com,
Tracy Spratt tr...@... wrote:

 I have tested with a joystick and it behaves the same as moving the mouse
 with no button pressed, and events stop at the screen boundaries.
 
 
 
 Tracy Spratt,
 
 Lariat Services, development services available
 
 _ 
 
 From: flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com
[mailto:flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com]
On
 Behalf Of Pedro Sena
 Sent: Tuesday, July 28, 2009 6:51 PM
 To: flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com
 Subject: Re: [flexcoders] AIR app, need MouseMove events NOT bounded by
 screen
 
 
 
 
 
 Hi Tracy,
 
 The joystick will not trigger events like the keyboard arrows? I would
 expect it from a joystick
 
 Regards
 
 On Tue, Jul 28, 2009 at 7:16 PM, Tracy Spratt tr...@nts3rd.
 mailto:tr...@... com wrote:
 
 
 
 This AIR app is to be embedded in a consumer electronics product. It is a
 transparent UI that indirectly controls an underlying map application by
 sending messages via sockets.
 
 The product actually has a joystick and not a mouse and one requirement is
 that moving the joystick will cause the map to pan. 
 
 In development, using a real mouse, when the mouse pointer hits a screen
 boundary, MouseMove events are no longer dispatched in that direction. In
a
 corner, all events cease. This is causing me problems with continuing to
 send messages to the application to continue panning.
 
 I am hoping the joystick will behave differently, but am also looking for
 any other suggestions. I have considered using a timer to send repeated
 increments (the back-end app only needs position deltas), but I haven't
 figured out how to stop that.
 
 As far as I can tell, there is no way to set the position of the system
 cursor. If I could reset the mouse x,y to some positive values when it
 approached an edge, that would work as well.
 
 Is there anyway I can get deeper into the mouse event? If I could get a
 generic moving event, that would also suffice.
 
 Any thoughts?
 
 Tracy Spratt
 
 
 
 
 -- 
 /**
 * Pedro Sena
 * Systems Architect
 * Sun Certified Java Programmer 
 * Sun Certified Web Component Developer
 */






RE: [flexcoders] variables name are in array

2009-07-29 Thread Tracy Spratt
Try:

for(var i:int = 0;i  arrName.length; i++)



 

Tracy Spratt,

Lariat Services, development services available

  _  

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Alexander Tarelkin
Sent: Wednesday, July 29, 2009 8:41 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] variables name are in array

 

  

Where is the breaking condition in the loop?

On Wed, Jul 22, 2009 at 12:57 AM, markflex2007 markflex2007@
mailto:markflex2...@yahoo.com yahoo.com wrote:

  

I use a array to save variable names and other to save values,but why the
following code doesn't work.please give me a idea.

for(var i:int = 0;arrName.length; i++)
{
arrName[i] = arrValue[i]; 
} 

Thanks a lot.

Mark




-- 
Alexander Tarelkin
Web Developer
devexperts.com





[flexcoders] Re: advanced datagrid refresh

2009-07-29 Thread valdhor
First off, it's a bit difficult to debug as we don't have access to your 
service to get the data you are seeing.

Anyway, one thing I noticed is that in your function refreshBtn_clickHandler, 
you have the line:

adg.dataProvider = {getAllItemsCollection};

This will not work as you intend. You are mixing ActionScript syntax with MXML 
syntax. I'm pretty sure that what you really want is:

adg.dataProvider = getAllItemsCollection;


--- In flexcoders@yahoogroups.com, awesome cubesp...@... wrote:

 
 When I press delete I need to refresh  datagrid to display changes. Currently
 it displays changes only when I reload the page.
 
 I tried getAllItemsCollection.refresh(); but it only collapses grouping and
 does not display changes.
 
 For testing purposes I created delete button and tried everything from
 invalidatedisplaylist to reassigning dataprovider but with no luck.
 
 Any help would be appreciated.
 
 My code:
 
 ?xml version=1.0 encoding=utf-8?
 mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=vertical
 minWidth=1024 minHeight=768
 xmlns:izdelkiservice=services.izdelkiservice.*
   mx:Script
   ![CDATA[
   import mx.events.AdvancedDataGridEvent;
   import mx.controls.dataGridClasses.DataGridColumn;
   import mx.controls.DataGrid;
   import mx.events.DataGridEvent;
   import mx.messaging.AbstractConsumer;
   import mx.utils.ObjectUtil;
   import mx.events.FlexEvent;
   import mx.controls.Alert;
   
   public var clickedColumn:String;
 
   protected function 
 adg_creationCompleteHandler(event:FlexEvent):void
   {
   getAllItemsResult.token = 
 izdelkiService.getAllItems();
   }
 
   protected function 
 button_clickHandler(event:MouseEvent):void
   {
   createItemResult.token = 
 izdelkiService.createItem(izdelek);
   }
 
   protected function 
 updateBtn_clickHandler(event:MouseEvent):void
   {
   updateItemResult.token = 
 izdelkiService.updateItem(izdelek2);
   }
 
   protected function 
 deleteBtn_clickHandler(event:MouseEvent):void
   {
   deleteItemResult.token = 
 izdelkiService.deleteItem(izdelek2.id);
   getAllItemsCollection.refresh();
   adg.dataProvider = adg.dataProvider;
   }
   
   private var _dataField:String;
   
   private function
 adg_headerReleaseHandler(event:AdvancedDataGridEvent):void
   {
   clickedColumn = event.dataField;
   }
   
   private function sortNumeric(obj1:Object, 
 obj2:Object):int
   {
   return
 ObjectUtil.numericCompare(obj1[clickedColumn],obj2[clickedColumn]);   
 
   }
   
   private function sortKat(obj1:Object, obj2:Object):int
   {
   return 
 ObjectUtil.numericCompare(obj1.kat,obj2.kat);
   }
 
   protected function 
 refreshBtn_clickHandler(event:MouseEvent):void
   {
   adg.dataProvider = null;
   adg.dataProvider = {getAllItemsCollection};
   getAllItemsCollection.refresh();
   adg.validateDisplayList();
   adg.validateNow();
   adg.invalidateDisplayList();
   adg.invalidateList();   
   }
   ]]
   /mx:Script
   mx:AdvancedDataGrid id=adg designViewDataType=tree width=100% 
   creationComplete=adg_creationCompleteHandler(event) 
 editable=false 
   dataProvider={getAllItemsCollection} height=50%
 headerRelease=adg_headerReleaseHandler(event)
   mx:columns
   mx:AdvancedDataGridColumn headerText=id 
 dataField=id
 editable=false sortCompareFunction=sortNumeric/
   mx:AdvancedDataGridColumn headerText=izdelek 
 dataField=izdelek/
   mx:AdvancedDataGridColumn headerText=ime 
 dataField=ime/
   mx:AdvancedDataGridColumn headerText=kat 
 dataField=kat
 sortCompareFunction=sortNumeric/
   mx:AdvancedDataGridColumn headerText=opis 
 

[flexcoders] Release Build through mxmlc

2009-07-29 Thread ilikeflex
Hi

I want to do Release build from the command line. I am using the following 
command to compile

mxmlc file=${grip.ui.src}/grip.mxml 
services=${web.inf}/flex/services-config.xml  
locale=en_US accessible=false  
actionscript-file-encoding=UTF-8
incremental=true
target-player=10.0.0 
output=${ui.output_build}/grip.swf
load-config 
filename=${FLEX_HOME}/frameworks/flex-config.xml/
compiler.source-path path-element=${grip.ui.src}/
compiler.debugfalse/compiler.debug  
compiler.context-root/grip/compiler.context-root

!-- List of SWC files or directories that contain SWC 
files. --
compiler.library-path dir=${web.inf}/flex append=true
include name=libs /
/compiler.library-path
compiler.library-path dir=${web.inf} append=true
include name=flexlib /
/compiler.library-path
compiler.library-path dir=${FLEX_HOME}/frameworks 
append=true
include name=libs/players/10 /
/compiler.library-path
/mxmlc


I have the option 
compiler.debugfalse/compiler.debug  
set to false. The file size after the mxmlc command is 961 KB.

But i see there is lot of difference in the file size when i run the relase 
build from Flex builder(606KB).

Any pointers are highly appreciated.

Thanks
ilikeflex



[flexcoders] Help with extending button

2009-07-29 Thread Angela
I am trying to create a toggle button that will show a label and a colored box 
dynamically. I thought extending the button component would be my best option. 
I add a Box component and set it's background color to the color passed to the 
button. 

Everything almost works, except the Box seems to be underneath the button and 
when it is toggled you can no longer see it (alpha is 100%).

I feel like I must be missing something very simple. Any help would be greatly 
appreciated.

Here is my code:

package com.view
{
import flash.display.DisplayObject;
import flash.events.MouseEvent;
import flash.text.TextLineMetrics;

import mx.containers.Box;
import mx.controls.Button;
import mx.core.UITextField;

public class LegendButton extends Button
{
[Bindable] public var legendColor:uint;
private var legendIcon:Box;

public function LegendButton()
{
super();
}

override protected function createChildren():void
{   
if (!legendIcon)
{
legendIcon = new Box;
legendIcon.styleName = this;

legendIcon.setStyle('backgroundColor',legendColor);
legendIcon.width = 10;
legendIcon.height = 10;
addChild(legendIcon);
}

if (!textField)
{
textField = new UITextField();
textField.styleName = this;

addChild(flash.display.DisplayObject(textField));
}

super.createChildren();
}

protected override function 
updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
{   
this.setStyle('paddingLeft',15);
this.setStyle('paddingRight',5);

legendIcon.move(5,5);

super.updateDisplayList(unscaledWidth,unscaledHeight);
}

override protected function measure():void
{
if (!isNaN(explicitWidth))
{
var w:Number = explicitWidth;
w -= getStyle('horizontalGap') + 
getStyle('paddingLeft') + getStyle('paddingRight');
textField.width = w;
}
super.measure();
}

override public function measureText(s:String):TextLineMetrics
{
textField.text = s;
var lineMetrics:TextLineMetrics = 
textField.getLineMetrics(0);
lineMetrics.width = textField.textWidth + 4;
lineMetrics.height = textField.textHeight + 4;
return lineMetrics;
} 

}
}


Angela
http://whatsmytitletoday.blogspot.com/



[flexcoders] catalog.xml on libRaVis.swc [1 Attachment]

2009-07-29 Thread cholid cholid
Hi all
can someone give information how to make file swc that the contain of
catalog.xml is like this (on attachment)
because i just can put in it a file/ file/ (with -include-file)

i can't put components/ and libraries that contain script/ and dep/
and def/

i hope has someone know it,because im confused
Thanks




  

[flexcoders] selecting entire line in Gumbo?

2009-07-29 Thread luvfotography
Hi,
back in Flex 3 builder you could click on the line number to highlight and 
select the entire line.  Now in Gumbo, if you click on the line number the line 
gets highlighted, but does not get selected!! 

How can I select the entire line in Gumbo??

(running Mac os x v10.5.6)



[flexcoders] how to check if xml attribut value exists

2009-07-29 Thread bhaq1972
var myXML:XML = root
 node label=hello1something/node
 node label=hello2something/node
/root;
when I do

trace(myXML..node.(@label=hello1).toXMLString()); 

its okay, but if i search for a @label which doesn't exists eg

trace(myXML..node.(@label=hello3).toXMLString())  

i get a runtime error - 
TypeError: Error #1088: The markup in the document following the root element 
must be well-formed.

How can I stop this runtime error, when I am looking for a non existant 
attribute value





[flexcoders] Manipulate y-axis of built-in tooltip?

2009-07-29 Thread Adrian Williams

Hi all,

   Quick question...is there a way to manipulate the y-axis position of 
a tooltip without using a custom tooltip? For example, I have an image 
that has uses the builtin tooltip and I need to have it display above 
the image.


   I have a series of images, side by side, in the bottom right of my 
screen...when a user hovers over one of the images, because they are 
already grounded in the bottom right, the tooltip shows up and covers 
the images so the user has to really pay attention to the text to 
realize which image they are clicking.


mx:Image id=cascadePic source={cascadeBtn} buttonMode=true 
click=cascadeWindows() verticalCenter=0 right=70 toolTip=Click to 
rearrange your widgets staggered one on another. /


   I'm trying to see if there is an easy way to deal with this without 
having to dig into custom tooltips.


Appreciate the help!
Adrian




Re: [flexcoders] Release Build through mxmlc

2009-07-29 Thread Marvin Froeder
May be using optimize=true?
Or using the optimizer
http://livedocs.adobe.com/flex/3/html/rsl_07.html


http://livedocs.adobe.com/flex/201/html/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Book_Partsfile=performance_118_16.html
VELO

On Wed, Jul 29, 2009 at 11:16 AM, ilikeflex ilikef...@yahoo.com wrote:



 Hi

 I want to do Release build from the command line. I am using the following
 command to compile

 mxmlc file=${grip.ui.src}/grip.mxml
 services=${web.inf}/flex/services-config.xml
 locale=en_US accessible=false
 actionscript-file-encoding=UTF-8
 incremental=true
 target-player=10.0.0
 output=${ui.output_build}/grip.swf
 load-config filename=${FLEX_HOME}/frameworks/flex-config.xml/
 compiler.source-path path-element=${grip.ui.src}/
 compiler.debugfalse/compiler.debug
 compiler.context-root/grip/compiler.context-root

 !-- List of SWC files or directories that contain SWC files. --
 compiler.library-path dir=${web.inf}/flex append=true
 include name=libs /
 /compiler.library-path
 compiler.library-path dir=${web.inf} append=true
 include name=flexlib /
 /compiler.library-path
 compiler.library-path dir=${FLEX_HOME}/frameworks append=true
 include name=libs/players/10 /
 /compiler.library-path
 /mxmlc


 I have the option
 compiler.debugfalse/compiler.debug
 set to false. The file size after the mxmlc command is 961 KB.

 But i see there is lot of difference in the file size when i run the relase
 build from Flex builder(606KB).

 Any pointers are highly appreciated.

 Thanks
 ilikeflex

  



[flexcoders] Re: AIR app, need MouseMove events NOT bounded by screen

2009-07-29 Thread Adrian Resa Jones
Do I understand correctly that you want to track when the mouse cursor/joystick 
leaves the Air App window? I don't see why you shouldn't be able to reset the x 
 y coordinates when they go off of the main application window. Not that logic 
always has anything to do with it. This is another one of those things that 
should be a given.  

Maybe this will help:

http://nexus.zteo.com/2008/11/02/flex-how-i-worked-around-mouse_outs-inefficiencies/

--- In flexcoders@yahoogroups.com, Tracy Spratt tr...@... wrote:

 This AIR app is to be embedded in a consumer electronics product.  It is a 
 transparent UI that indirectly controls an underlying map application by 
 sending messages via sockets.
 
 The product actually has a joystick and not a mouse and one requirement is 
 that moving the joystick will cause the map to pan.  
 
 In development, using a real mouse, when the mouse pointer hits a screen 
 boundary, MouseMove events are no longer dispatched in that direction.  In a 
 corner, all events cease.  This is causing me problems with continuing to 
 send messages to the application to continue panning.
 
 I am hoping the joystick will behave differently, but am also looking for any 
 other suggestions.  I have considered using a timer to send repeated 
 increments (the back-end app only needs position deltas), but I haven't 
 figured out how to stop that.
 
 As far as I can tell, there is no way to set the position of the system 
 cursor.  If I could reset the mouse x,y to some positive values when it 
 approached an edge, that would work as well.
 
 Is there anyway I can get deeper into the mouse event?  If I could get a 
 generic moving event, that would also suffice.
 
 Any thoughts?
 
 Tracy Spratt





[flexcoders] flex 4.0 component focus issue

2009-07-29 Thread blc187
trying to use tab key to tab through some inputfields in a form but none of my 
components get focus.  
anyone have any experience with focus issues using the flex 4.0 sdk?

heres a sample of my code:

mx:Form width=340
  mx:FormItem label=Username width=100% 
s:TextInput tabEnabled=true tabIndex=0/
  /mx:FormItem
  mx:FormItem label=Password width=100% 
s:TextInput tabEnabled=true tabIndex=1 /
  /mx:FormItem
/mx:Form

s:Button label=Login tabEnabled=true tabIndex=2 /

I am trying to tab through username to password to the login button. 
But when I hit tab the focus goes either to the location bar or possibly to the 
app itself (seems like there is a light gray focus rect around the entire app 
at some times).

Also tried this without the form or formitems, just two textInputs and a button 
without any luck.

Has anything changed with the focus manager or enabling tabbing through 
components that I might be missing?



[flexcoders] Styling menu of PopUpButton

2009-07-29 Thread Richard Rodseth
I have a PopUpButton subclass which pops up a menu built as follows:

private function buildMenu():void {
_menu = new Menu();
_menu.dataProvider = _availableItems;
_menu.labelFunction = this.menuItemLabelFunction;


_menu.setStyle(openDuration, 3500);

_menu.addEventListener(itemClick, itemClickHandler);
this.popUp = _menu;
}


[flexcoders] Re: Styling menu of PopUpButton

2009-07-29 Thread Richard Rodseth
Damn gmail, wasn't ready to send. Anyway, I'm trying to style this menu, and
calling setStyleName or setStyle (as below) has no effect. Even a

Menu {
   open-duration:3500;
}

in the css file affects other menus but not this one.
Any ideas?

On Wed, Jul 29, 2009 at 10:17 AM, Richard Rodseth rrods...@gmail.comwrote:

 I have a PopUpButton subclass which pops up a menu built as follows:

 private function buildMenu():void {
 _menu = new Menu();
 _menu.dataProvider = _availableItems;
 _menu.labelFunction = this.menuItemLabelFunction;


 _menu.setStyle(openDuration, 3500);

 _menu.addEventListener(itemClick, itemClickHandler);
 this.popUp = _menu;
 }




[flexcoders] extracting file path of a file

2009-07-29 Thread Adarsh Agrawal






Hi,
i'm new in flex ..trying to load an external xml file whose path is provided by 
the user at run time.
 
can any one help me in below mentioned problems.

how to allow user to provide path of the file using browser window or popup 
window which need to be loaded in flex.
 
regards,
adarsh





  Love Cricket? Check out live scores, photos, video highlights and more. 
Click here http://cricket.yahoo.com

Re: [flexcoders] Re: how to cleanly reduce the height of a TitleWindow's title bar

2009-07-29 Thread Andrew Ball
That's exactly what I was looking for!  Thanks!

Andrew

On Tue, Jul 28, 2009 at 8:05 PM, Tim Hoff timh...@aol.com wrote:



 Hi Andrew,

 Have you tried the headerHeight Style in CSS?

 TitleWindow
 {
  header-height: 20;
 }

 -TH


 --- In flexcoders@yahoogroups.com, Andrew Ball anb...@... wrote:
 
  I'm unhappy with how tall the title bars are by default for TitleWindows
 in
  my application. We have some (possibly modified) Panels with shorter
  titlebars. Does anyone know of a clean way to get the title bars of the
  TitleWindows to be a bit shorter without hard-coding any sizes? I'm
 looking
  for something like a CSS attribute I can use in the style I have
 designated
  for the title bar, which already selects the font, size, and color of the
  text in the title bar.
 
  Thanks for your help,
  Andrew
 
  --
  ===
  Andrew D. Ball
  勃安
  deus caritas est
  http://www.ibiblio.org/adball/blog/
 
  




-- 
===
Andrew D. Ball
勃安
deus caritas est
http://www.ibiblio.org/adball/blog/


[flexcoders] Flexbuilder 3 Java problems

2009-07-29 Thread Merrill, Jason
I'm having Java runtime problems with Flexbuilder 3 again.  I swear, I'm
so tired of this. I've never had software that kept breaking so much.
I've done nothing to Flex (though maybe my company has), and it seems to
break every six months or so.  So weird.  Anyway, the problem is when I
try and launch FB3, I get the following message:

Could not create the Java virtual machine

Then I click the OK button and it quits.

So I thought, OK, I'll make sure I have Java installed, that I have the
latest installed.  Nope, that didn't work (installing Java 6 and putting
the newer Java files into FB3's JRE folder) - so I moved the previous
ones back into the JRE folder.  Right now, the JRE version installed in
my C:\Program Files\Adobe\Flex Builder 3\jre folder is version 6.  

So then I thought maybe Java was messed up in my Eclipse folder, but I
couldn't find any Java references in there.  

I see in my Java control panel (windows XP) that I have the following on
my system:

Platform:  1.6,  Product: 1.6.0_14, Path: C:Program
Files\Java\jre6\bin\javaw.exe  Enabled: true
Platform:  1.6,  Product: 1.6.0_5, Path: C:Program
Files\Java\jre1.6.0_05\bin\javaw.exe  Enabled: true
Platform:  1.4,  Product: 1.4.2_17, Path: C:Program
Files\Java\jre1.4.2_17\bin\javaw.exe  Enabled: true

Any clues on how to fix this?  Thanks,


Jason Merrill 

Bank of  America  Picture (Device Independent Bitmap)   Global
Learning 
Shared Services Solutions Development 

Monthly meetings on the Adobe Flash platform for rich media experiences
- join the Bank of America Flash Platform Community
http://sharepoint.bankofamerica.com/sites/tlc/flash/default.aspx  





attachment: ole0.bmp

[flexcoders] Does it required to have Licenced Version of LCDS for Clustering

2009-07-29 Thread Dharmendra Chauhan
Hi,
  I am bit confused on LCDS products. I have downloaded trial version and 
trying to replicate DataService's Destination.

Does it required to buy licensed veresion of LCDS  to DataServive Destination 
replication ?

My req is If serverA is down then user should immedialtely get connected to 
serverB with the same state as It was on  serverA.

Regards,
Dharmendra

 



[flexcoders] Re:compc namespace issue gumbo.

2009-07-29 Thread Nayan
Hi Mike,

I am still getting the same error, if i put in the external libs it just means 
that the files get compiled without the flex framework and my swc file is 8 kb 
instead of 600kb.

For some reason the name space is causing an issue and i have tried including 
all the source paths too but it makes no difference. 

this is my new build.xml file.


?xml version=1.0?
project name=first basedir=. default=main 
taskdef resource=flexTasks.tasks 
classpath=${basedir}/flexTasks/lib/flexTasks.jar / 
!--property name=FLEX_HOME value=/Applications/Adobe Flash Builder 
Beta/sdks/4.0.0/ --
property name=FLEX_HOME value=/Users/nayan/Downloads/flex_sdk_4//
property name=DEPLOY_DIR value=./ 
property name=COMPONENT_ROOT value=./ 

property name=projects.dir value=${FLEX_HOME}frameworks/projects/
property name=airframework.dir value=${projects.dir}/airframework/
property name=flex.dir value=${projects.dir}/flex/

property name=framework.dir value=${projects.dir}/framework/
property name=halo.dir value=${projects.dir}/halo/
property name=haloclassic.dir value=${projects.dir}/haloclassic/
property name=rpc.dir value=${projects.dir}/rpc/
property name=sparkskin.dir value=${projects.dir}/sparkskins/
property name=utilities.dir value=${projects.dir}/utilities/
property name=wireframe.dir value=${projects.dir}/wireframe/
property name=locale value=en_US/

target name=main 
  
compc output=${DEPLOY_DIR}/MyComps.swc compiler.debug=false 
compiler.optimize= include-classes=components.MySkin components.Button1
target-player=10 directory=true 
source-path path-element=./ 
source-path 
path-element=${FLEX_HOME}/frameworks/projects/
source-path path-element=${framework.dir}/src/
source-path 
path-element=${framework.dir}/bundles/${locale}/
source-path path-element=${flex.dir}/src/


namespace uri=http://www.nayansavla.com/2009; 
manifest=${DEPLOY_DIR}/manifest.xml/



include-namespaces 
uri=http://www.nayansavla.com/2009/  

namespace uri=library://ns.adobe.com/flex/spark 
manifest=${FLEX_HOME}/frameworks/spark-manifest.xml/  
namespace uri=http://ns.adobe.com/mxml/2009; 
manifest=${FLEX_HOME}/frameworks/mxml-2009-manifest.xml/
namespace uri=http://www.adobe.com/2006/mxml; 
manifest=${FLEX_HOME}/frameworks/mxml-manifest.xml/

include-namespaces 
uri=library://ns.adobe.com/flex/spark/
include-namespaces 
uri=http://ns.adobe.com/mxml/2009/
include-namespaces 
uri=http://www.adobe.com/2006/mxml/
  external-library-path dir=${FLEX_HOME}/frameworks/libs 
include name=player/10/playerglobal.swc /
include name=flex.swc /
include name=flex4.swc /
include name=framework.swc /
include name=rpc.swc /
include name=sparkskins.swc /
include name=textLayout.swc /
include name=utilities.swc /
/external-library-path

keep-as3-metadata name=ComponentAlias /
keep-as3-metadata name=ComponentHandler /
keep-as3-metadata name=SkinHandler /
keep-as3-metadata name=PartHandler /
keep-as3-metadata name=ServiceHandler /
keep-as3-metadata name=Part /
keep-as3-metadata name=StyleBinding /
/compc 
/target 
   
/project




thank you for the reply.

Nayan

--- In flexcoders@yahoogroups.com, Teoti Graphix, LLC teoti.grap...@... 
wrote:

 Hi,
 
 This is what I use and I am compiling large component frameworks in 
 nightly builds of Flex 4.
 
 compc
 output=${output.product.swc}
 link-report=${basedir}/deployed/link-report.xml

 target-player10/target-player
 namespace
 uri=http://www.teotigraphix.com;
 manifest=${basedir}/build/component-manifest.xml/

 namespace
 uri=library://ns.adobe.com/flex/spark
 
 manifest=${flexsdk.dir}/frameworks/projects/spark/manifest.xml/

 include-namespaces uri=http://www.teotigraphix.com/

 source-path path-element=${global.framework.src.dir}/
 source-path path-element=${library.src.dir}/

 external-library-path dir=${flexsdk.libs.dir}
 include 

[flexcoders] Re: Flexbuilder 3 Java problems

2009-07-29 Thread valdhor
Have you changed your memory settings for Eclipse??

This thread may help:

http://forums.sun.com/thread.jspa?threadID=677639



--- In flexcoders@yahoogroups.com, Merrill, Jason jason.merr...@... wrote:

 I'm having Java runtime problems with Flexbuilder 3 again.  I swear, I'm
 so tired of this. I've never had software that kept breaking so much.
 I've done nothing to Flex (though maybe my company has), and it seems to
 break every six months or so.  So weird.  Anyway, the problem is when I
 try and launch FB3, I get the following message:
 
 Could not create the Java virtual machine
 
 Then I click the OK button and it quits.
 
 So I thought, OK, I'll make sure I have Java installed, that I have the
 latest installed.  Nope, that didn't work (installing Java 6 and putting
 the newer Java files into FB3's JRE folder) - so I moved the previous
 ones back into the JRE folder.  Right now, the JRE version installed in
 my C:\Program Files\Adobe\Flex Builder 3\jre folder is version 6.  
 
 So then I thought maybe Java was messed up in my Eclipse folder, but I
 couldn't find any Java references in there.  
 
 I see in my Java control panel (windows XP) that I have the following on
 my system:
 
 Platform:  1.6,  Product: 1.6.0_14, Path: C:Program
 Files\Java\jre6\bin\javaw.exe  Enabled: true
 Platform:  1.6,  Product: 1.6.0_5, Path: C:Program
 Files\Java\jre1.6.0_05\bin\javaw.exe  Enabled: true
 Platform:  1.4,  Product: 1.4.2_17, Path: C:Program
 Files\Java\jre1.4.2_17\bin\javaw.exe  Enabled: true
 
 Any clues on how to fix this?  Thanks,
 
 
 Jason Merrill 
 
 Bank of  America  Picture (Device Independent Bitmap)   Global
 Learning 
 Shared Services Solutions Development 
 
 Monthly meetings on the Adobe Flash platform for rich media experiences
 - join the Bank of America Flash Platform Community
 http://sharepoint.bankofamerica.com/sites/tlc/flash/default.aspx





[flexcoders] How to displaying symbols embedded in SWC files in Flex button icon styles?

2009-07-29 Thread Todd
Hello,
  I'm trying to do something that I think should be pretty basic.
  I have a mx:Button that at runtime, I want to set the icon property to 
artwork that I have embedded in a SWC file.  

  Now, I know about using the Embed tag declaring a new object of type Class, 
like 
   [Embed(source=logo.gif)]
   [Bindable] public var imgCls:Class;

However, I have artwork already declared in an imported SWC.  I know the Embed 
tag doesn't work for SWCs. 

I use this artwork just fine in setting mx:Image.source for display all over 
the application.

However, when I set the mx:Button.setTyle(icon, my_icon), I get an error:
TypeError: Error #1034: Type Coercion failed: cannot convert 
my_i...@315b02e1 to mx.core.IFlexDisplayObject.


Heck, I even tried simple reflection using the following to create a Class that 
resulted in the same error.:
var iconClass:Class = getDefinitionByName(my_icon) as Class;
btn.styleDeclaration.setStyle(icon, iconClass);  

I've tried casting, creating classes, etc...but nothing works.  I don't really 
want to create another version of the artwork.

Any ideas on how to set the icon property of a Button at runtime with a symbol 
declared in a SWC?





[flexcoders] Re: Flex Compilation takes long time

2009-07-29 Thread Todd
Unfortunately, you can do all those things noted above, you can restructure 
your modules, etc...but you'll probably still have longer compile times than 
you like. 

I've learned to live with it, and just treat our Flex projects like C++ 
projects in 1995.

Even optimized, on fast machines, we're looking at a minimum of 1 minute, 8 
seconds per compile for a single module.  And then 90 seconds for a single 
application.  

It really sucks when you're trying to do fast recompile because you're tweaking 
a UI item.


--- In flexcoders@yahoogroups.com, ondemand_mayur ondemand_ma...@... wrote:

 Hi folks,
 
 I have a project crated with Flex 3 ( SDK 3.2 ).
 When ever I compile it really takes much long time min 4 to 5 mins ( i.e. 240 
 to 300 seconds).
 
 That really make my developers crazy and it is so frustrating.
 
 Has any one any suggestions how to make compilation process faster.
 
  *   I have already set   -incremental=true   for flex compiler in Flex 
 Builder 3.
  *   I have around six diff. modules in my project. ( And I have noticed 
 after modularization of my application it takes some more time for 
 compilation I know that in the process - flex builder has to call another 
 tool for module compilation other then MXMLC )
 
 
 I Need some tech. Tips and suggestions to reduce the time for compilation.
 
 
 Thanking you in advance.
 
 Mayur





Re: [flexcoders] Re: Flex Compilation takes long time

2009-07-29 Thread Greg Hess
Although I have not tried this yet, the Flex 4 compiler has major
optimizations and is backwards compatible. Apparently, you can install
Flex 4 and configure Flex Builder to use its compiler instead of Flex
3 mxmlc.

HTH,

Greg

On Wed, Jul 29, 2009 at 3:39 PM, Toddtpreka...@gmail.com wrote:


 Unfortunately, you can do all those things noted above, you can restructure
 your modules, etc...but you'll probably still have longer compile times than
 you like.

 I've learned to live with it, and just treat our Flex projects like C++
 projects in 1995.

 Even optimized, on fast machines, we're looking at a minimum of 1 minute, 8
 seconds per compile for a single module. And then 90 seconds for a single
 application.

 It really sucks when you're trying to do fast recompile because you're
 tweaking a UI item.

 --- In flexcoders@yahoogroups.com, ondemand_mayur ondemand_ma...@...
 wrote:

 Hi folks,

 I have a project crated with Flex 3 ( SDK 3.2 ).
 When ever I compile it really takes much long time min 4 to 5 mins ( i.e.
 240 to 300 seconds).

 That really make my developers crazy and it is so frustrating.

 Has any one any suggestions how to make compilation process faster.

 * I have already set  -incremental=true  for flex compiler in Flex
 Builder 3.
 * I have around six diff. modules in my project. ( And I have noticed
 after modularization of my application it takes some more time for
 compilation I know that in the process - flex builder has to call another
 tool for module compilation other then MXMLC )


 I Need some tech. Tips and suggestions to reduce the time for compilation.


 Thanking you in advance.

 Mayur


 


[flexcoders] Re: Flexbuilder 3 Java problems

2009-07-29 Thread Jason
I haven't changed anything that I am aware of.  I'm concerned that my 
enterprise did withouth my knowledge, but I have played with various settings 
in the ini files for both Flexbuilder and Eclipse and not had any luck, so I 
reverted back.  Could you or someone else send me examples of what's in your 
eclipse.ini and flexbuilde.ini files - preferrably for a machine with 2GB RAM.  
Thanks!

Jason


--- In flexcoders@yahoogroups.com, valdhor valdhorli...@... wrote:

 Have you changed your memory settings for Eclipse??
 
 This thread may help:
 
 http://forums.sun.com/thread.jspa?threadID=677639
 
 



[flexcoders] LinkBar Link Width

2009-07-29 Thread jdizowat
Is there a way to set a default link width for all links in a LinkBar?

I tried this guy's approach - http://tdotblog.info/?q=node/25.  Doesn't seem to 
be working.

Thanks~



[flexcoders] Lcds via Tomcat on Mac - possible?

2009-07-29 Thread one_rabbit_one
I have read that although Lcds isn't supported by Adobe on macs, it is easy to 
hack it to get it working.  Duane Nickull explains it - in his usual rather 
gung-ho way - for jBoss and LCDS 2.5 - and Simeon Bateman explains it for 
Tomcat. I've tried following them for LCDS 2.6.1 -  I I unzipped the 
ds-console.war and lcds-samples.war into webapps/ROOT within Tomcat 6.0.20... 
and can see the ds-console on localhost, but when configuring Flex and 
validating the web-root, I get the error message 'LiveCycle Data Services is 
not installed at the specified location'. I tried including the unzipped 
lcds.war as well... but that didn't help.  Can anyone help me to solve this... 
or suggest another alternative route?  E.g Should I be using something 
different to supply data services on Mac? (I haven't looked into Granite.. for 
instance...).

Thanks in anticipation.



Re: [flexcoders] Does it required to have Licenced Version of LCDS for Clustering

2009-07-29 Thread Matt Chotin
Hi, yes you are required to have a paid license of LCDS if you expect to do 
clustering.

Matt


On 7/29/09 11:32 AM, Dharmendra Chauhan chauhan_i...@yahoo.com wrote:





Hi,
 I am bit confused on LCDS products. I have downloaded trial version and trying 
to replicate DataService's Destination.

Does it required to buy licensed veresion of LCDS  to DataServive Destination 
replication ?

My req is If serverA is down then user should immedialtely get connected to 
serverB with the same state as It was on  serverA.

Regards,
Dharmendra







[flexcoders] Context Menu

2009-07-29 Thread wayne vetrone

Hello All,

My searching is turning up empty.  Does any one know of a way to determine when 
a right click context menu is closing/closed?

thanks
wev

_
Windows Live™ SkyDrive™: Store, access, and share your photos. See how.
http://windowslive.com/Online/SkyDrive?ocid=TXT_TAGLM_WL_CS_SD_photos_072009

Re: [flexcoders] Re: Need help Combobox label property

2009-07-29 Thread Mark Lapasa
You got a questionable data model if the country names are not bundled 
with the same SOAP msg that has your country codes.

1) Is your Flex binary supposed to have hardcoded all the country names?
2) What happens if you have the server-side return you a country code 
that the client does not expect?

It seems to me that it is half dynamic.

Wouldn't your life be easier if the java WS just told you both the combo 
box label and the underlying country code, instead of just the country code?


Anyways, if you can't do anything about it and you have to work with 
what you got, another approach (in line with Tracy's idea) is to have a 
Dictionary whose keys are your country code and values are country 
names. The next fancy step would be the cache the dictionary into a 
SharedObject so that the next time the user uses the combo box control, 
previously known country code and country name pairs will be available 
to the user. Just some thoughts



gan_sun2006 wrote:
  

 Thanks to everyone for suggestions.

 I am having a combo in which the values are dynamically coming from DB 
 thru java WS. The case is, when i select a country for instance say 
 India, the code for the corresponding selection IN is saved to the 
 DB thru java WS during SAVE action. When i retrieve the value in 
 future, I am given only the countrycode IN. Using this code, I have 
 to show the countryname on label property of my combo. I am currently 
 looping thru the arraycol(dataprovider) for checking the code for IN 
 and setting the arraycol index to combo.selectedIndex. I cannot use 
 switch() here as the values are dynamic from DB.

 Is there any other better way of doing this...?

 Thanks in advance!!!

 Regards,
 Ganesh Sundar R.

 --- In flexcoders@yahoogroups.com 
 mailto:flexcoders%40yahoogroups.com, Jeffry Houser j...@... wrote:
 
 
  I started to give him a similar answer, but then realized he may be
  talking about setting the selectedItem on the ComboBox. He mentioned he
  already had a labelField which seems to be exactly what he needs for
  display purposes without a complicated switch statement.
 
  Ganesh, if neither answer helps you, could you elaborate on the problem?
 
  Mark Lapasa wrote:
  
  
   look at combo boxes labelfunction
   the function will then inspect the countrycode and you'll have a nasty
   switch statement that will output the correct country name
  
   -mL
  
   gan_sun2006 wrote:
   
   
Hi,
   
I am using combobox for which the bound data is coming from an
arraycollection. My arraycollection has two properties called
countryname(labelField) and countrycode. When i submit my page, the
countrycode from my combo is saved to the DB. During retrieval I am
given only countrycode and not countryname.
   
How can I show the equivalent countryname as selectedItem in my
combobox? Presently I am looping through the arraycollection and
showing the equivalent countyname. Is there any other way to do it?
   
Any help is highly appreciated...
   
Regards,
Ganesh Sundar R.
   
   
  
   Notice of confidentiality:
   The information contained in this e-mail is intended only for the use
   of the individual or entity named above and may be confidential.
   Should the reader of this message not be the intended recipient, you
   are hereby notified that any unauthorized dissemination, distribution
   or reproduction of this message is strictly prohibited. If you have
   received this message in error, please advise the sender immediately
   and destroy the e-mail.
  
  
 
  --
  Jeffry Houser, Technical Entrepreneur
  Adobe Community Expert: http://tinyurl.com/684b5h 
 http://tinyurl.com/684b5h
  http://www.twitter.com/reboog711 http://www.twitter.com/reboog711 
 | Phone: 203-379-0773
  --
  Easy to use Interface Components for Flex Developers
  http://www.flextras.com?c=104 http://www.flextras.com?c=104
  --
  http://www.theflexshow.com http://www.theflexshow.com
  http://www.jeffryhouser.com http://www.jeffryhouser.com
  --
  Part of the DotComIt Brain Trust
 

 



Notice of confidentiality:
The information contained in this e-mail is intended only for the use of the 
individual or entity named above and may be confidential. Should the reader of 
this message not be the intended recipient, you are hereby notified that any 
unauthorized dissemination, distribution or reproduction of this message is 
strictly prohibited. If you have received this message in error, please advise 
the sender immediately and destroy the e-mail.



Re: [flexcoders] Re: Need help Combobox label property

2009-07-29 Thread Jeffry Houser

Ganesh,

I'm still pretty sure my original post answers your question.  In 
essence, no.  You're dong it the way it has to be done.  The Flextras 
AutoCompleteComboBox basically just encapsulates that loop so it is 
easier for you to handle. 


Mark,

 He already loaded the country names and country codes.  Why is it 
wrong to minimize the amount of data returned with the new call?  I 
think his situation is very common.


Mark Lapasa wrote:
 


You got a questionable data model if the country names are not bundled
with the same SOAP msg that has your country codes.

1) Is your Flex binary supposed to have hardcoded all the country names?
2) What happens if you have the server-side return you a country code
that the client does not expect?

It seems to me that it is half dynamic.

Wouldn't your life be easier if the java WS just told you both the combo
box label and the underlying country code, instead of just the country 
code?


Anyways, if you can't do anything about it and you have to work with
what you got, another approach (in line with Tracy's idea) is to have a
Dictionary whose keys are your country code and values are country
names. The next fancy step would be the cache the dictionary into a
SharedObject so that the next time the user uses the combo box control,
previously known country code and country name pairs will be available
to the user. Just some thoughts

gan_sun2006 wrote:


 Thanks to everyone for suggestions.

 I am having a combo in which the values are dynamically coming from DB
 thru java WS. The case is, when i select a country for instance say
 India, the code for the corresponding selection IN is saved to the
 DB thru java WS during SAVE action. When i retrieve the value in
 future, I am given only the countrycode IN. Using this code, I have
 to show the countryname on label property of my combo. I am currently
 looping thru the arraycol(dataprovider) for checking the code for IN
 and setting the arraycol index to combo.selectedIndex. I cannot use
 switch() here as the values are dynamic from DB.

 Is there any other better way of doing this...?

 Thanks in advance!!!

 Regards,
 Ganesh Sundar R.

 --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 mailto:flexcoders%40yahoogroups.com, Jeffry Houser j...@... wrote:
 
 
  I started to give him a similar answer, but then realized he may be
  talking about setting the selectedItem on the ComboBox. He 
mentioned he

  already had a labelField which seems to be exactly what he needs for
  display purposes without a complicated switch statement.
 
  Ganesh, if neither answer helps you, could you elaborate on the 
problem?

 
  Mark Lapasa wrote:
  
  
   look at combo boxes labelfunction
   the function will then inspect the countrycode and you'll have a 
nasty

   switch statement that will output the correct country name
  
   -mL
  
   gan_sun2006 wrote:
   
   
Hi,
   
I am using combobox for which the bound data is coming from an
arraycollection. My arraycollection has two properties called
countryname(labelField) and countrycode. When i submit my 
page, the
countrycode from my combo is saved to the DB. During retrieval 
I am

given only countrycode and not countryname.
   
How can I show the equivalent countryname as selectedItem in my
combobox? Presently I am looping through the arraycollection and
showing the equivalent countyname. Is there any other way to 
do it?

   
Any help is highly appreciated...
   
Regards,
Ganesh Sundar R.
   
   
  
   Notice of confidentiality:
   The information contained in this e-mail is intended only for 
the use

   of the individual or entity named above and may be confidential.
   Should the reader of this message not be the intended recipient, you
   are hereby notified that any unauthorized dissemination, 
distribution

   or reproduction of this message is strictly prohibited. If you have
   received this message in error, please advise the sender immediately
   and destroy the e-mail.
  
  
 
  --
  Jeffry Houser, Technical Entrepreneur
  Adobe Community Expert: http://tinyurl.com/684b5h 
http://tinyurl.com/684b5h

 http://tinyurl.com/684b5h http://tinyurl.com/684b5h
  http://www.twitter.com/reboog711 
http://www.twitter.com/reboog711 http://www.twitter.com/reboog711 
http://www.twitter.com/reboog711

 | Phone: 203-379-0773
  --
  Easy to use Interface Components for Flex Developers
  http://www.flextras.com?c=104 http://www.flextras.com?c=104 
http://www.flextras.com?c=104 http://www.flextras.com?c=104

  --
  http://www.theflexshow.com http://www.theflexshow.com 
http://www.theflexshow.com http://www.theflexshow.com
  http://www.jeffryhouser.com http://www.jeffryhouser.com 
http://www.jeffryhouser.com http://www.jeffryhouser.com

  --
  Part of the DotComIt Brain Trust
 



Notice of confidentiality:
The information contained in this e-mail is intended only for the use 
of the individual or entity named above and 

Re: [flexcoders] Re: Flex Compilation takes long time

2009-07-29 Thread Marvin Froeder
I agree flex is slow... but I never saw it taking more then 30 secs per
module

VELO

On Wed, Jul 29, 2009 at 4:39 PM, Todd tpreka...@gmail.com wrote:



 Unfortunately, you can do all those things noted above, you can restructure
 your modules, etc...but you'll probably still have longer compile times than
 you like.

 I've learned to live with it, and just treat our Flex projects like C++
 projects in 1995.

 Even optimized, on fast machines, we're looking at a minimum of 1 minute, 8
 seconds per compile for a single module. And then 90 seconds for a single
 application.

 It really sucks when you're trying to do fast recompile because you're
 tweaking a UI item.


 --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com,
 ondemand_mayur ondemand_ma...@... wrote:
 
  Hi folks,
 
  I have a project crated with Flex 3 ( SDK 3.2 ).
  When ever I compile it really takes much long time min 4 to 5 mins ( i.e.
 240 to 300 seconds).
 
  That really make my developers crazy and it is so frustrating.
 
  Has any one any suggestions how to make compilation process faster.
 
  * I have already set  -incremental=true  for flex compiler in Flex
 Builder 3.
  * I have around six diff. modules in my project. ( And I have noticed
 after modularization of my application it takes some more time for
 compilation I know that in the process - flex builder has to call another
 tool for module compilation other then MXMLC )
 
 
  I Need some tech. Tips and suggestions to reduce the time for
 compilation.
 
 
  Thanking you in advance.
 
  Mayur
 

  



[flexcoders] Re: Need help Combobox label property

2009-07-29 Thread vin.flex
Hi there,

You can use the following code:

?xml version=1.0 encoding=utf-8?
mx:ComboBox xmlns:mx=http://www.adobe.com/2006/mxml;
   mx:Script
  ![CDATA[
 private var _selectedValue:String;
 private var bSelectedValueSet:Boolean = false;
 private var bDataProviderSet:Boolean = false;

 // Override committ, this may be called repeatedly 
 override protected function commitProperties():void
 {
// invoke ComboBox version 
super.commitProperties();

// If value set and have dataProvider 
if (bSelectedValueSet  bDataProviderSet)
{
   // Set flag to false so code won't be called until selectedValue 
is set again 
   bSelectedValueSet=false;
   // Loop through dataProvider 
   for (var i:int=0;ithis.dataProvider.length;i++)
   {
  // Get this item's data 
  var item:String = this.dataProvider[i].FIELDNAME;
   
  // Check if is selectedValue 
  if(item == _selectedValue)
  {
 // Yes, set selectedIndex 
 this.selectedIndex = i;
 break;
  }
   }
}
 }

 // Trap dataProvider being set 
 override public function set dataProvider(o:Object):void
 {
// invoke ComboBox version 
super.dataProvider = o;

// This may get called before dataProvider is set, so make sure not 
null and has entries 
if (o!=null  o.length)
{
   // Got it, set flag 
   bDataProviderSet = true;
} else
   bDataProviderSet = false;
 }

 // set for selectedValue 
 public function set selectedValue(s:String):void
 {
// Set flag 
bSelectedValueSet = true;
// Save value 
_selectedValue = s;
// Invalidate to force commit 
invalidateProperties();
 }
  ]]
   /mx:Script

/mx:ComboBox



create this as a reusable component and use this instead of regular 
combobox:

1) Make sure to replace FIELDNAME in the above code with the name of the 
field in the dataprovider.

2) Instead of selectedindex use comboboxId.selectedValue = Value you want to 
ser.

this will solve your problem.


vin.



RE: [flexcoders] Re: AIR app, need MouseMove events NOT bounded by screen

2009-07-29 Thread Tracy Spratt
Thanks, but my issue is that the AIR app is full screen.  And AIR does not
provide any way to set the system cursor(mouse pointer) position.

 

I think I have an interim solution that notes when the mouse position
reaches a boundary and sends a message to the socket server which calls an
OS level program to reset the cursor position.  As hoped, AIR recognizes
this action and the next mouse move begins at the reset position.  I still
have some wrinkles to work out but I think this will keep us going until we
figure out something better.

 

Tracy Spratt,

Lariat Services, development services available

  _  

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Adrian Resa Jones
Sent: Wednesday, July 29, 2009 1:04 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: AIR app, need MouseMove events NOT bounded by
screen

 

  

Do I understand correctly that you want to track when the mouse
cursor/joystick leaves the Air App window? I don't see why you shouldn't be
able to reset the x  y coordinates when they go off of the main application
window. Not that logic always has anything to do with it. This is another
one of those things that should be a given. 

Maybe this will help:

http://nexus.
http://nexus.zteo.com/2008/11/02/flex-how-i-worked-around-mouse_outs-ineffi
ciencies/
zteo.com/2008/11/02/flex-how-i-worked-around-mouse_outs-inefficiencies/

--- In flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com,
Tracy Spratt tr...@... wrote:

 This AIR app is to be embedded in a consumer electronics product. It is a
transparent UI that indirectly controls an underlying map application by
sending messages via sockets.
 
 The product actually has a joystick and not a mouse and one requirement is
that moving the joystick will cause the map to pan. 
 
 In development, using a real mouse, when the mouse pointer hits a screen
boundary, MouseMove events are no longer dispatched in that direction. In a
corner, all events cease. This is causing me problems with continuing to
send messages to the application to continue panning.
 
 I am hoping the joystick will behave differently, but am also looking for
any other suggestions. I have considered using a timer to send repeated
increments (the back-end app only needs position deltas), but I haven't
figured out how to stop that.
 
 As far as I can tell, there is no way to set the position of the system
cursor. If I could reset the mouse x,y to some positive values when it
approached an edge, that would work as well.
 
 Is there anyway I can get deeper into the mouse event? If I could get a
generic moving event, that would also suffice.
 
 Any thoughts?
 
 Tracy Spratt