[flexcoders] actionscript + library

2010-09-08 Thread Ariel J
is there a way to configure a project in Flash Builder natively (as in, not 
using a custom builder) to create a pure actionscript project that compiles 
into a SWC not a SWF?



[flexcoders] Re: New Flex Mapping Framework

2010-08-24 Thread Ariel J
Bravo, this is very nice.

--- In flexcoders@yahoogroups.com, bryan.dresselhaus bryan.dresselh...@... 
wrote:

 Hey guys,
  
 Just wanted to let you know about a new Flex Component Framework I've been 
 working on for the last year or so.  Its for building rich, interactive 
 polygon based maps.  It differs from a lot of mashup techniques that leverage 
 google maps or mapquest in that its fully client side driven and offers a lot 
 of flexibility and creativity.
  
 Please let me know what you think of the demo and documentation.
  
 http://www.libertyvanguard.com/liberty-gis
  
 Demo:
  
 http://www.libertyvanguard.com/applications/LibertyGISDemo/LibertyGISD 
 emo.html
  
 Documentation:
  
 http://www.libertyvanguard.com/documentation/LibertyGIS-asdoc/index.ht ml
  
 Regards,
  
 Bryan Dresselhaus





[flexcoders] Re: flash builder: how to create an as3 project WITHOUT flex sdk

2010-08-12 Thread Ariel J
Update
--

From the Flash Builder Help:

ActionScript projects

Based on the Flash API, not the Flex framework, ActionScript projects let 
ActionScript developers use Flash Builder to code, build, and debug 
ActionScript-only applications.


Yet, when I create a new AS project, it asks which Flex sdk i want to use. Huh?






--- In flexcoders@yahoogroups.com, Ariel J arielj...@... wrote:

 When I go to the ActionScript 3.0 Reference for the Adobe Flash Platform, I 
 am able to specify filters for the runtime and products. I have specified AIR 
 2.0 and FP 10.1, Flash CS4, but no Flex. How do I create a project in Flash 
 Builder to match these limitations?





[flexcoders] Re: flash builder: how to create an as3 project WITHOUT flex sdk

2010-08-12 Thread Ariel J
If I remove the Flex SDK entry from the build path, it can't find the 
definition for Sprite. So I think I need to leave it and instead, remove 
specific swc entries below it, like framework.swc.

Does that sound right?

--- In flexcoders@yahoogroups.com, seanmcmonahan s...@... wrote:

 I may be wrong but I believe this is because MXMLC is used to compile AS 
 projects in Flash Builder and the compiler may change with different versions 
 of Flex.
 
 You can always look at the library path for your project to verify whether or 
 not Flex is included in your project (it shouldn't be for AS projects).
 
 --- In flexcoders@yahoogroups.com, Ariel J arieljake@ wrote:
 
  Update
  --
  
  From the Flash Builder Help:
  
  ActionScript projects
  
  Based on the Flash API, not the Flex framework, ActionScript projects let 
  ActionScript developers use Flash Builder to code, build, and debug 
  ActionScript-only applications.
  
  
  Yet, when I create a new AS project, it asks which Flex sdk i want to use. 
  Huh?
  
  
  
  
  
  
  --- In flexcoders@yahoogroups.com, Ariel J arieljake@ wrote:
  
   When I go to the ActionScript 3.0 Reference for the Adobe Flash Platform, 
   I am able to specify filters for the runtime and products. I have 
   specified AIR 2.0 and FP 10.1, Flash CS4, but no Flex. How do I create a 
   project in Flash Builder to match these limitations?
  
 





[flexcoders] Re: flash builder: how to create an as3 project WITHOUT flex sdk

2010-08-12 Thread Ariel J
Two things:

1) I need to include the AIR libraries? How do I add those to an Actionscript 
project?

2) When I create a Flex project, and replace the WindowedApplication mxml file 
with a similarly named file that is .as and that extends Sprite, I can write 
stage.nativeWindow.activate(). However, when I create an Actionscript project, 
and try to access the stage.nativeWindow propoerty, its not there. Why not? 
Isn't it the same flash.display.Sprite class?

--- In flexcoders@yahoogroups.com, Clark Stevenson a.scots...@... wrote:

 Yeah mate.
 
 You need the Flex SDK but if you start an Actionscript project you have no
 access to the MXML stuff.
 
 I dont use Flex as a MXML language... ie the framework. It reminds me of
 boring forms and banking applications. But AS3 on the other hand. You
 can do anything you want.
 
 Clark.
 
 On 12 August 2010 20:27, Oleg Sivokon olegsivo...@... wrote:
 
 
 
  The definition for Sprite is in playerglobals.swc. However, you are asking
  wrong question. You cannot compile an AS3 project w/o SDK, or you would need
  at least an alternative compiler, and only one that exists is the one
  developed by SWFTools few years ago. But it's outdated now... so,
  technically, for AS3 Flex SDK is your only option. On the other hand, having
  other libraries in your path won't harm because they aren't embedded in your
  project, unless you explicitly embed them.
   
 





[flexcoders] Re: flash builder: how to create an as3 project WITHOUT flex sdk

2010-08-12 Thread Ariel J
Yes, but in an Actionscript project, how do I add the AIR classes for 
development?

--- In flexcoders@yahoogroups.com, Oleg Sivokon olegsivo...@... wrote:

 You need to package the application using ADT, and launch it for testing
 using ADL. AIR runtime is different from player and it has more classes, one
 of them is NativeApplication. Player doesn't have that, so, you cannot run
 the SWF compiled for AIR in the player because some classes won't be there.
 http://help.adobe.com/en_US/AIR/1.5/devappshtml/WS5b3ccc516d4fbf351e63e3d118666ade46-7fd6.html
 here's a guide on how to do that.





[flexcoders] Re: flash builder: how to create an as3 project WITHOUT flex sdk

2010-08-12 Thread Ariel J
Thanks all.

--- In flexcoders@yahoogroups.com, Oleg Sivokon olegsivo...@... wrote:

 {sdk}/frameworks/libs/air
 look there for swc files. airglobal.swc is the must, all the rest are
 optional, or so I think.





[flexcoders] Re: Stopping a function

2010-07-28 Thread Ariel J
yes, but you can mimic multithreading to permit one process to interrupt 
another

http://blogs.adobe.com/aharui/2008/01/threads_in_actionscript_3.html

--- In flexcoders@yahoogroups.com, Paul Andrews p...@... wrote:

 On 28/07/2010 09:57, Christophe wrote:
  Hello,
 
  How to stop a ruuning function by software of another function ?
 
  FunctionA
  {
  }
 
  FunctionB
  {
   Stop FunctionA
  }
 
  Thank you,
  Christophe,
 
 
 Christophe, you cannot execute FunctionB while FunctionA executes, 
 except if you call FunctionB from FunctionA.
 
 There is only one thread of execution, so your question doesn't make 
 sense for this environment.





[flexcoders] Re: Setting width/height not affecting visual display?

2010-07-14 Thread Ariel J
my guess is that the 200x100 rect was working properly but the +5 stuff wasn't?

I remember dealing with this and saw somewhere that sprites are sized only when 
content is there, so for example, if you just add pixels to the height, it 
won't get bigger, but if you draw a bigger rect, e.g. 200x105, it will.

--- In flexcoders@yahoogroups.com, Roy Pardi roypa...@... wrote:

 At 3:14 PM +0200 7/13/10, Oleg Sivokon wrote:
 These properties may be overridden. My gut feeling says there should be
 something like commitProperties / validate or some similar method to apply
 all changes to the changed display object.
 
 
 Thanks for the reply. Still tinkering here - I changed the type of the
 'childSprite' var to be an instance of 'Sprite' - and then it works:
 changing the width/height of 'testSprite (SpriteVisualElement) results in
 a resizing of its child content.
 
 Guess I am not clear on when to use 'SpriteVisualElement' - I started using
 it in place of 'Sprite' because I could not add a Sprite to any of the
 Spark containers. Much of my app's content is generated through code.
 
 
 
 public var testSprite:SpriteVisualElement
 
 protected function creationCompleteHandler(event:FlexEvent):void
 {
 
   testSprite = new SpriteVisualElement();
 
   var childSprite:Sprite = new Sprite();
   childSprite.graphics.beginFill(0x00, 1);
   childSprite.graphics.drawRect(0, 0, 200, 100);
   childSprite.graphics.endFill();
   childSprite.name = child;
 
   testSprite.addChild(childSprite);
 
   container.addElement(testSprite);
   testSprite.addEventListener(MouseEvent.CLICK, grow);
 }
 
 
 public function grow(event:MouseEvent):void
 {
   event.target.width += 5;
   event.target.height += 5;
   trace(grow,  event.target.width);
 }
 -- 
 -
 http://www.roypardi.com/





[flexcoders] Re: Problems getting a DataGroup to scroll

2010-06-11 Thread Ariel J
Try this for alt #2:

s:Scroller width=100% horizontalScrollPolicy=off 
verticalScrollPolicy=auto top=50 bottom=0
s:DataGroup dataProvider={items} 
itemRenderer=com.silenttrace.hal.views.ItemRenders.AliveDeadItemRenderer 
width=100% clipAndEnableScrolling=false
s:layout
layouts1:FilteredTileLayout id=filterLayout filteredItems={filteredItems}/
/s:layout
/s:DataGroup
/s:Scroller

--- In flexcoders@yahoogroups.com, Raymond Brown silenttr...@... wrote:

 I have attempted twice to get a tileList of data in a DataGroup to scroll, 
 here are my two attempts:
 
 ATTEMPT ONE:
 s:SkinnableDataContainerwidth=100% height=100% 
 itemRenderer=com.silenttrace.hal.views.ItemRenders.AliveDeadItemRenderer 
 dataProvider={items}
 s:layout
 layouts1:FilteredTileLayout id=filterLayout 
 filteredItems={filteredItems}/
 /s:layout
 /s:SkinnableDataContainer
 
 
 ATTEMPT TWO:
 s:Scroller width=100% height=100% horizontalScrollPolicy=off 
 verticalScrollPolicy=auto
 s:DataGroup dataProvider={items} 
 itemRenderer=com.silenttrace.hal.views.ItemRenders.AliveDeadItemRenderer 
  top=50 left=0 right=0 horizontalCenter=0 
 clipAndEnableScrolling=true
 s:layout
 layouts1:FilteredTileLayout id=filterLayout 
 filteredItems={filteredItems}/
 /s:layout
 /s:DataGroup
 /s:Scroller
 
 So as you can see the first attempt was to use a skinnableContainer, and the 
 second was to use a Scroller.  What happens is the tileList layout works 
 great but there is NEVER a scroll bar so that I can see all the data.  What 
 happens is as I resize and move the window around I can see more and more of 
 the data but when the window gets a little smaller I miss data - is there 
 something I am missing?
 
 -r





[flexcoders] Re: TextInput textAlign

2010-03-24 Thread Ariel J
verticalCenter=0 in a Canvas

--- In flexcoders@yahoogroups.com, chandruflex chandruf...@... wrote:

 I am using Flex 3. Is it possible to align the text in the TextInput control 
 to be vertically centered?





[flexcoders] 360flex videos

2010-03-22 Thread Ariel J
I was told attendees would get access to the videos from the conference. Anyone 
know where they can be found?



[flexcoders] Re: i do not get flex 4 skinning?

2010-03-15 Thread Ariel J
You can use illustrator or fireworks in CS5 and export the vector drawings as 
FXG (XML) that can be pasted into a Flex 4 skin and compiled. Get to me at 
arieljake at yahoo dot com if you want help with that process.

--- In flexcoders@yahoogroups.com, dorkie dork from dorktown 
dorkiedorkfromdorkt...@... wrote:

 what do we use for visually skinning flex 4 skins? flash builder 4?
 
 right now i'm trying to create an item renderer for a list control
 
 rant
 i don't want to design my skin through markup. i want to use a visual tool.
 /rant
 
 ddfd





[flexcoders] Re: Cloud computing with Flex

2010-03-10 Thread Ariel J
Look into Adobe Stratus 2.

--- In flexcoders@yahoogroups.com, Christophe christophe_jacque...@... 
wrote:

 Hello, 
 
 Is it possible to do Cloud computing (on Amazon EC2, ..) with Flex or Air ? 
 
 Do you have any examples ? 
 
 Thank you,
 Christophe,





[flexcoders] vector as a dataProvider

2010-03-05 Thread Ariel J
Does anyone else think that it's a shame that Vector doesn't implement IList 
and can't be used as a dataProvider? Is there a reason for this?



[flexcoders] Label help

2010-02-23 Thread Ariel J
I could really use some help with this one.

I have an item renderer consisting of two labels, positioned horizontally.

I want to fill the distance between them with , for example:

Car.$40,000
House..$400,000

Any ideas how to do this?

Also, there is the caveat that I draw the ... in a way that matches the ... 
from Flex truncating the first item.

I am using Spark Label Components, which matters because I can't change the 
truncationText anymore without affecting all Labels in the app (who decided to 
change this on the flex team i have no idea or why!).

Thanks all.



[flexcoders] Re: Best practices regarding XML to VO conversion

2010-02-09 Thread Ariel J
I'm interested in seeing your code.

--- In flexcoders@yahoogroups.com, W.R. de Boer w...@... wrote:

 Hi Claudiu,
 
 I am using my custom unmarshaller class in combination with XML/E4X but I 
 keep having a memory. Maybe I am just doing something? Maybe it's the use of 
 a Vector-type in main VO object which stores child VO objects?
 
 Maybe I have to nullify the variables with vectors or arrays? I can put some 
 code online on pastebin.com. If anyone is interested.
 
 Weyert de Boer





[flexcoders] new Flex 4 includeIn property/style

2010-02-05 Thread Ariel J
I can't seem to find it in the docs or source. Anyone know if it supports comma 
delimited lists of states?



[flexcoders] flex 4: skinnable component vs skinnable container

2010-02-04 Thread Ariel J
How are people using these two classes? When are people using component rather 
than component? Don't most custom components include multiple parts, thus 
suggesting that container is the most common class to extend?



[flexcoders] setting font family for mx|FormItemLabel causes label to disappear

2010-01-29 Thread Ariel J
I am embedding the Calibri font as written below. When I use CSS to set the 
font-family for mx|FormItem to Calibri, the labels disappear. Anyone know why?

@font-face {
src: url('/../assets/fonts/CALIBRI.ttf');
font-family: Calibri;
unicode-range: U+0021-U+00A0; /* whole range of uppercase, lowercase, 
symbols and punctuation. */
}

@font-face {
src: url('/../assets/fonts/CALIBRIB.ttf');
font-family: Calibri;
font-weight: bold;
unicode-range: U+0021-U+00A0; /* whole range of uppercase, lowercase, 
symbols and punctuation. */
}




[flexcoders] Re: spark list functions missing?

2010-01-22 Thread Ariel J
1) dataGroup.getElementAt won't return renderers for non-visible items
2) dataGroup.verticalScrollPosition is measured in pixels not items
3) dataGroup.getElementAt cannot receive an index based on the dataProvider 
because if the 10th item is the first visible item, the index of the renderer 
for the 10th item is the element at position 0.
4) ensureIndexIsVisible works, but does not tell us where the item renderer is 
positioned in the dataGroup so we still have to seach the elements of the 
dataGroup to get the item of interest. 

Interestingly enough, if you create a list of height 100 with 5 data items and 
use an item renderer with height 50 so only 2 items show at a time, the 
dataGroup's numElements property will equal 5, yet cycling through them, three 
will be null.

To get indexToItemRenderer type functionality, you need to:

myList.ensureIndexIsVisible(4);
myList.validateNow();

for (var i:int = 0; i  myList.dataGroup.numElements; i++)
{
var element:IVisualElement = myList.dataGroup.getElementAt(i);

if (element != null)
{
if (ItemRenderer(element).data == dp.getItemAt(indexOfInterest))
{
return element;
}
}
}

--- In flexcoders@yahoogroups.com, Alex Harui aha...@... wrote:

 I haven¡Çt actually tried it but you could use
 
 
  1.  dataGroup.getElementAt
  2.  dataGroup.verticalScrollPosition
  3.  dataGroup.getElementAt(dataProvider.getItemIndex(item)) != null)
  4.  ensureIndexIsVisible
 
 
 On 1/21/10 7:14 PM, j2me_soul j2me_s...@... wrote:
 
 
 
 
 
 
 yes, I find this problem too.
 
 Is anybody figure out this ?
 
 
 ºß2010-01-22 02:59:50¡¤Ariel J arielj...@... ¼ÌÆ»¡§
 
 Where are these methods in the spark list control:
 
 1) indexToItemRenderer()
 
 2) set verticalScrollPosition() - that uses the index of the item in the data 
 provider
 
 3) isItemVisible()
 
 4) scrollToIndex
 
 I am also not finding them in DataGroup.
 
 
 
 
 
 
 
 
 --
 Alex Harui
 Flex SDK Team
 Adobe System, Inc.
 http://blogs.adobe.com/aharui





[flexcoders] flex 4 - application root

2010-01-22 Thread Ariel J
anyone know how to get a reference to the root Application in some static way. 

I used to say PopUpManager.addPopup() with the Application.application as the 
parent. That property isn't there anymore. 

Are there other options?



[flexcoders] spark list functions missing?

2010-01-21 Thread Ariel J
Where are these methods in the spark list control:

1) indexToItemRenderer()

2) set verticalScrollPosition() - that uses the index of the item in the data 
provider

3) isItemVisible()

4) scrollToIndex

I am also not finding them in DataGroup.



[flexcoders] Re: IGraphicElement and LayoutBase

2010-01-19 Thread Ariel J
Totally agree with you. I hate having to create a VGroup inside a Group just so 
I can draw a Rectangle as the background of the Group and still layout all the 
other children vertically, for example.

--- In flexcoders@yahoogroups.com, Florian florian.saliho...@... wrote:

 Yes, in that case i would expect the Displayobject to effecting the layout 
 and the measuring.
 
 But that's not what we always want. Sometimes we just want to draw to the 
 graphics property of a component/container. It would be absurd to create a 
 GroupBase instance to not layout the instances like a VGroup and a Rect, 
 which should be the VGroups background.
 
 So, Performance is no issue with the Flash Player anymore?
 
 --- In flexcoders@yahoogroups.com, Ariel J arieljake@ wrote:
 
  From the docs for IGraphicElement:
  
  Group organizes its IGraphicElement children in sequences that share and 
  draw to the same DisplayObject. The DisplayObject is created by the first 
  element in the sequence.
  
  That means that there is a single DisplayObject added to the display list 
  upon which the graphic primitives are drawn. I am sure this DisplayObject 
  is subject to the behaviors of the layout of the Group, as in BasicLayout 
  vs. VerticalLayout, just like any other child of the Group.
  
  --- In flexcoders@yahoogroups.com, Florian florian.salihovic@ wrote:
  
   Ah, thanx. that clearifies a lot. But i don't understand why. I thought 
   the IGraphicElements would be a util class to draw complex shapes into 
   the owners graphic property. Which also means to me that the constraints 
   should applied to be bounds of the component...
   
   What am i missing?
   
   Best regards!
   
   --- In flexcoders@yahoogroups.com, Ariel J arieljake@ wrote:
   
You can. It's just that the constraint based sizing of the inner rect 
doesn't work when you use a vertical layout. Change them to height and 
width values of 100% and you'll see.

--- In flexcoders@yahoogroups.com, Florian florian.salihovic@ wrote:

 
 Why is it not possible to draw an IGraphicElement into a Group which 
 has
 a LayoutBase instance applied to it?
 
 ?xml version=1.0 encoding=utf-8?
 
 s:Application xmlns:fx=http://ns.adobe.com/mxml/2009;
 
xmlns:s=library://ns.adobe.com/flex/spark
 
xmlns:mx=library://ns.adobe.com/flex/halo minWidth=1024
 minHeight=768
 
 
 
 
 fx:Script
 
 ![CDATA[
 
 import mx.graphics.SolidColor;
 
 
 
 import spark.layouts.VerticalLayout;
 
 
 
 
 protected function button1_clickHandler(event:MouseEvent):void
 
 {
 
 base.layout = new VerticalLayout();
 
 }
 
 ]]
 
 /fx:Script
 
 
 
 
 fx:Declarations
 
 !-- Place non-visual elements (e.g., services, value objects) here 
 --
 
 /fx:Declarations
 
 
 
 
 s:controlBarContent
 
 s:Button click=button1_clickHandler(event) /
 
 /s:controlBarContent
 
 
 
 
 s:Group id=base bottom=100 left=100 right=100 top=100
 
 s:Rect bottom=0 fill={new SolidColor(0, .5)} left=0 right=0
 top=0 /
 
 /s:Group
 
 /s:Application

   
  
 





[flexcoders] Re: IGraphicElement and LayoutBase

2010-01-18 Thread Ariel J
From the docs for IGraphicElement:

Group organizes its IGraphicElement children in sequences that share and draw 
to the same DisplayObject. The DisplayObject is created by the first element in 
the sequence.

That means that there is a single DisplayObject added to the display list upon 
which the graphic primitives are drawn. I am sure this DisplayObject is subject 
to the behaviors of the layout of the Group, as in BasicLayout vs. 
VerticalLayout, just like any other child of the Group.

--- In flexcoders@yahoogroups.com, Florian florian.saliho...@... wrote:

 Ah, thanx. that clearifies a lot. But i don't understand why. I thought the 
 IGraphicElements would be a util class to draw complex shapes into the owners 
 graphic property. Which also means to me that the constraints should applied 
 to be bounds of the component...
 
 What am i missing?
 
 Best regards!
 
 --- In flexcoders@yahoogroups.com, Ariel J arieljake@ wrote:
 
  You can. It's just that the constraint based sizing of the inner rect 
  doesn't work when you use a vertical layout. Change them to height and 
  width values of 100% and you'll see.
  
  --- In flexcoders@yahoogroups.com, Florian florian.salihovic@ wrote:
  
   
   Why is it not possible to draw an IGraphicElement into a Group which has
   a LayoutBase instance applied to it?
   
   ?xml version=1.0 encoding=utf-8?
   
   s:Application xmlns:fx=http://ns.adobe.com/mxml/2009;
   
  xmlns:s=library://ns.adobe.com/flex/spark
   
  xmlns:mx=library://ns.adobe.com/flex/halo minWidth=1024
   minHeight=768
   
   
   
   
   fx:Script
   
   ![CDATA[
   
   import mx.graphics.SolidColor;
   
   
   
   import spark.layouts.VerticalLayout;
   
   
   
   
   protected function button1_clickHandler(event:MouseEvent):void
   
   {
   
   base.layout = new VerticalLayout();
   
   }
   
   ]]
   
   /fx:Script
   
   
   
   
   fx:Declarations
   
   !-- Place non-visual elements (e.g., services, value objects) here --
   
   /fx:Declarations
   
   
   
   
   s:controlBarContent
   
   s:Button click=button1_clickHandler(event) /
   
   /s:controlBarContent
   
   
   
   
   s:Group id=base bottom=100 left=100 right=100 top=100
   
   s:Rect bottom=0 fill={new SolidColor(0, .5)} left=0 right=0
   top=0 /
   
   /s:Group
   
   /s:Application
  
 





[flexcoders] Re: The grammar of Embed to define Class/Function in CSS?

2010-01-18 Thread Ariel J

.myStyle {
rendererClass: ClassReference(com.mycompany.myClass);
}

--- In flexcoders@yahoogroups.com, xiaoming_w...@... xiaoming_w...@... 
wrote:

 Hi gurus,
 
 I have a component with style definitions like the following:
 
 [Style(name=rendererClass,type=Class,inherit=yes)]
 [Style(name=rendererFunction,type=Function,inherit=yes)]
 
 How to define the vlaue of these 2 styles in a CSS file if the class name and 
 function name are known? I guess Embed works but no idea about how.
 
 background-image:Embed(/style_undefined/assets/general/bg.png);
 
 Thanks in advance.





[flexcoders] Re: Binding and Spark Skins

2010-01-18 Thread Ariel J
You are not tackling this right.

The component does not create the title bar as a child.
The skin will do that.

Check this out:

(1) Do the component in ActionScript. Declare the expected elements that the 
skin will define as variables. Define their behaviors and properties in the 
partAdded function.

package com.mycompany {
[SkinState(normal)]

public class HostComponent extends SkinnableContainer
{
[SkinPart(required=false)]
public var titleBar:IReportTitleBar

override protected function partAdded(partName:String,instance:Object):void
  {
if (instance == titleBar)
   {
titleBar.label = My Label;
// or use Binding: 
BindingUtils.bindPropert(titleBar,label,this,titleBarLabel);
}
  }
}

  // don't forget the partRemoved function, too

}

(2) Then, the skin only defines the titleBar using convenient MXML.

s:SparkSkin 
  fx:Metadata
[HostComponent(com.mycompany.HostComponent)] 
  /fx:Metadata
s:states
s:State name=normal/
/s:states
controls:DCDocTitleBar id=titleBar /
/s:SparkSkin



--- In flexcoders@yahoogroups.com, amiller.demandlending amil...@... wrote:

 Hi Everyone,
 
 I have a sub-component which uses a String binding on a Label. The bindings 
 works fine if I do not use a skinClass on the host component. If I do use a 
 SparkSkin, my bindings do not execute on the sub-component. Instead, I get 
 the value which I initialized it to.
 
 Am I doing something wrong, or is this expected behavior?
 
 If this is expected behavior, then what is the purpose of a SparkSkin if I 
 have to explicitly redeclare all my control code in the skin?
 
 I could just be misunderstanding the intended usage, but from what I 
 understood in the docs it seems like a very powerful new feature.
 
 Would anyone be able to enlighten me on the topic a bit more?
 
 
 Here is the trimmed code for my host/sub
 
 Host Component
 
 s:SkinnableContainer skinClass=demand.skins.DSDoc 
   fx:Metadata
   [SkinState(normal)]
   /fx:Metadata
   fx:Script
   ![CDATA[   
   [SkinPart(required=false)]
   public var titleBar:IReportTitleBar
   
   override protected function createChildren():void
   {
   if (!_titleBar)
   {
   _titleBar = new DCDocTitleBar();
   
 this.addElementAt(IVisualElement(_titleBar), 0);
   }
   super.createChildren();
   }
   ]]
   /fx:Script
 /s:SkinnableContainer
 ---
 
 The title bar sub-component
 
 s:SkinnableContainer 
   fx:Script
   ![CDATA[
   [Bindable]
   public var label:String=Incorrect Label;
   ]]
   /fx:Script
   s:Label text={this.label}/
 /s:SkinnableContainer
 
 
 The host component skin
 
 s:SparkSkin 
   fx:Metadata
   [HostComponent(demand.reports.DRDoc)] 
   /fx:Metadata
   s:states
   s:State name=normal/
   /s:states
   controls:DCDocTitleBar id=titleBar /
 /s:SparkSkin
 
 
 
 Thanks in advance!
 
 ~Aaron





[flexcoders] Re: Flex, SOAP and Process Flow

2010-01-18 Thread Ariel J
I use the Operation classes from the MVCS architecture from Joe Berkowitz to 
group the series of external calls, for each user in your case.

--- In flexcoders@yahoogroups.com, trefalgar trefal...@... wrote:

 I've run into an odd problem that I haven't been able to find a solution to. 
 In other programming languages (Perl, PHP, for example), if I want to do X, Y 
 and Z in order, all with remote calls, it's very easy and straight forward. 
 With Flex, I'm pretty confused on how to do something this simple. Here's the 
 problem and why I'm confused ...
 
 I'm using Flex and SOAP to talk to a web interface. In order to get to step 
 Y, I have to first do step X. I can not skip to step Y without step X being 
 complete. But setting up the flow to be two subroutine calls, X first, then 
 Y, doesn't mean that X finishes first (and lately means Y actually finishes 
 first).
 
 callX(var1,var2);
 callY(var3,var4);
 
 Since Flex uses listeners, and not return() how do you pass data around to 
 know that X is complete? 
 
 callX(var1,var2);
 {wait for callX to be finished, before continuing}
 callY(var3,var4);
 
 How do you pass data around successfully to do that check? Does my problem 
 description make any sense or is my brain fried? ;)
 
 Treffy.





[flexcoders] Re: flex 4 text styling

2010-01-15 Thread Ariel J
Thank you for that.

--- In flexcoders@yahoogroups.com, Ariel J arielj...@... wrote:

 In the language reference, I see styles such as fontSharpness and 
 fontAntiAliasType for Label, but I am not seeing them as styles for the spark 
 Label or RichText. Are they no longer being used?





[flexcoders] Re: IGraphicElement and LayoutBase

2010-01-15 Thread Ariel J
You can. It's just that the constraint based sizing of the inner rect doesn't 
work when you use a vertical layout. Change them to height and width values of 
100% and you'll see.

--- In flexcoders@yahoogroups.com, Florian florian.saliho...@... wrote:

 
 Why is it not possible to draw an IGraphicElement into a Group which has
 a LayoutBase instance applied to it?
 
 ?xml version=1.0 encoding=utf-8?
 
 s:Application xmlns:fx=http://ns.adobe.com/mxml/2009;
 
xmlns:s=library://ns.adobe.com/flex/spark
 
xmlns:mx=library://ns.adobe.com/flex/halo minWidth=1024
 minHeight=768
 
 
 
 
 fx:Script
 
 ![CDATA[
 
 import mx.graphics.SolidColor;
 
 
 
 import spark.layouts.VerticalLayout;
 
 
 
 
 protected function button1_clickHandler(event:MouseEvent):void
 
 {
 
 base.layout = new VerticalLayout();
 
 }
 
 ]]
 
 /fx:Script
 
 
 
 
 fx:Declarations
 
 !-- Place non-visual elements (e.g., services, value objects) here --
 
 /fx:Declarations
 
 
 
 
 s:controlBarContent
 
 s:Button click=button1_clickHandler(event) /
 
 /s:controlBarContent
 
 
 
 
 s:Group id=base bottom=100 left=100 right=100 top=100
 
 s:Rect bottom=0 fill={new SolidColor(0, .5)} left=0 right=0
 top=0 /
 
 /s:Group
 
 /s:Application





[flexcoders] spark Form

2010-01-15 Thread Ariel J
Hi all. I need help debugging a port of the halo Form to spark.

I can't get the FormItem to layout its children correctly. The TextInput in the 
example below sizes past the edge of the FormItem.

Any help would be appreciated.

ns:Form width=100%

ns:FormItem label=URL: width=100% 
s:TextInput width=100% /
/ns:FormItem

/ns:Form

The files for the Form control are located in this Google Docs directory: 
https://docs.google.com/leaf?id=0B8pe9gUeykKWZjg1ODliNjctODViMi00Y2JlLTg0ZGQtYjdiNGE1Y2RmNDlihl=en



[flexcoders] flex 4 text styling

2010-01-14 Thread Ariel J
In the language reference, I see styles such as fontSharpness and 
fontAntiAliasType for Label, but I am not seeing them as styles for the spark 
Label or RichText. Are they no longer being used?



[flexcoders] Re: spark list

2010-01-12 Thread Ariel J
Thank you Claudiu for the response. 

I was using a custom item renderer, and yet the blue highlight for selection 
was still appearing, so I knew the change had to do with the Item Renderer 
class, not the skin.

There is a property autoDrawBackground in itemRenderer, that when set to 
false, stops drawing the selection highlight.

Thanks again.

--- In flexcoders@yahoogroups.com, claudiu ursica the_bran...@... wrote:

 The selectable is gone. Depending on what you are trying to achieve you can 
 do it from skinning the spark list. Use a skin class for the list and inside 
 there probably a datagroup to which you attach an intemrenderer. Inside the 
 renderer you put the skin for the list item. If you don't want it to change 
 colord for selectable, use the same color for all states e.g normal, hovered, 
 selected...
 
 HTH,
 Claudiu
 
 
 
 From: Ariel J arielj...@...
 To: flexcoders@yahoogroups.com
 Sent: Fri, January 8, 2010 11:55:59 PM
 Subject: [flexcoders] spark list
 

 anyone know what happened to the selectable property from the mx.controls. 
 List?





[flexcoders] bugs forum for Fireworks (FXG feedback)

2010-01-12 Thread Ariel J
anyone know where we file bugs for how Fireworks exports FXG?



[flexcoders] spark list

2010-01-08 Thread Ariel J
anyone know what happened to the selectable property from the 
mx.controls.List?



[flexcoders] Re: Stop ToolTips from Appearing on Certain Buttons.

2010-01-05 Thread Ariel J
i believe you can do this by setting the tooltip text to the empty string

--- In flexcoders@yahoogroups.com, taude1 tpreka...@... wrote:

 This seems like it should be easy. I know I can turn tooltips off with the 
 ToolTipManager, but that's applciation wide.  I want to disable tooltips from 
 certain Buttons.
 
 I've implemented various combinations of tooltipShow, tooltipStart, 
 tooltipCreate on teh Button and tried setting the toolTips to NULL, to 
 creating a dummy toolTip, etc...
 
 
 Any ideas on how to totally supress tooltips?
 
 Thanks,





[flexcoders] Re: rewriting a function using prototype?

2009-12-29 Thread Ariel J
Thats neat.

--- In flexcoders@yahoogroups.com, jamesfin james.alan.finni...@... wrote:

 
 
 I've used this in this pasta bit more verbose but does the trick.
 
 ?xml version=1.0 encoding=utf-8?
 mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute 
 creationComplete=createJunk()
 
 
 mx:Script
   ![CDATA[
   
 import mx.controls.Alert;
 
 public static function createJunk():void {
   
 var j:junk1 = new junk1();
 
 // style 1 outputs base f1
 j.f1();
 
 // style 2 outputs base f1
 j[f1]();
 
 // ooops, have a bug in base f1, reassign it!
 j.dF1 = function():void{trace(junk1 f1 override);}; 
 
 
 // override f1 outputs junk1 f1 override
 j[f1]();
 }
 
 
   ]]
 /mx:Script
 
 /mx:Application
 
 
 
  package {
  
   public class junk1 {
   import mx.controls.Alert;
   
   public var dF1:Function = realf1;
   
   public function f1():void { 
   dF1();
   }
 
   private function realf1():void{
   trace(base f1);
   }
 }
  }
 
 
 
 
 
 --- In flexcoders@yahoogroups.com, mitchgrrt mitch_gart@ wrote:
 
  In the generated classes there's a hierarchy.  The one with the function I 
  want to override is a base class of another class.  If I extend and 
  override, the other classes in the hierarchy won't get my fix.
  
  --- In flexcoders@yahoogroups.com, Paul Andrews paul@ wrote:
  
   How about extending the Ant generated classes and overriding the function?
   
   Paul
 





[flexcoders] Re: flex 4 skins + presentation model

2009-12-29 Thread Ariel J
I handled this by creating a private var in the component like:

private var _listDataProviderWatcher:ChangeWatcher;

Then, in partAdded, I:

_listDataProviderWatcher = 
BindingUtils.bindProperty(myPart,dataProvider,this,[presentationModel,listData]);

Then, in partRemoved, I:

_listDataProviderWatcher.unwatch();


Just FYI.

--- In flexcoders@yahoogroups.com, Ariel J arielj...@... wrote:

 Can anyone suggest how to merge these? The issue is that the presenation 
 model is not necessarily available when the skin parts are added in 
 partAdded() which is where skin parts tend to be integrated. Does it involve 
 a lot of BindingUtils? How are people doing this?





[flexcoders] Re: how to open pdf, word file using flex

2009-12-23 Thread Ariel J
var url:String = path-to-pdf;
var request:URLRequest = new URLRequest(url); 
flash.net.navigateToURL(request,_blank);  

--- In flexcoders@yahoogroups.com, vikranth4u vikrant...@... wrote:

 Hi
  can anybody help me regarding how to write a code to open a pdf or doc file 
 using flex





[flexcoders] Re: getters before setters

2009-12-16 Thread Ariel J
 As long as you define the [Bindable] metadata tag right before a 
 getter, the
 order of the setters/getters doesn't really matter.

I remember Alex Harui saying Bindable can indeed go before the setter, too.

See this page:

http://livedocs.adobe.com/flex/3/html/databinding_8.html#194574

Note #3:

Before a public, protected, or private property defined by a getter or setter 
method

--- In flexcoders@yahoogroups.com, Tibor ballai.t...@... wrote:

 
 
 Hi Nick,
 
 As long as you define the [Bindable] metadata tag right before a getter, the 
 order of the setters/getters doesn't really matter.
 
 However, as a coding convention, most people do define getters before 
 setters, it helps by making your code more maintainable.
 
 Here are a few examples where the order does matter:
 
 /*~~THIS IS CORRECT~~*/
 
 [Bindable(fooChanged)]
 public function get foo():String{
 return _bar;
 }
 public function set foo(value:String):void{
 _bar=value;
 this.dispatchEvent(new Event(fooChanged));
 }
 private var _bar:String;
 
 /
 
 
 /*~~THIS IS STILL CORRECT even through the setter is defined 
 first*/
 
 public function set foo(value:String):void{
 _bar=value;
 this.dispatchEvent(new Event(fooChanged));
 }
 [Bindable(fooChanged)]
 public function get foo():String{
 return _bar;
 }
 private var _bar:String;
 
 /
 
 
 /*~~THIS IS INCORRECT*/
 
 [Bindable(fooChanged)]
 public function set foo(value:String):void{
 _bar=value;
 this.dispatchEvent(new Event(fooChanged));
 }
 public function get foo():String{
 return _bar;
 }
 private var _bar:String;
 
 /
 
 
 Hope this helps clear things up,
 
 Tibor.
 
 www.tiborballai.com
 
 --- In flexcoders@yahoogroups.com, Nick Middleweek nick@ wrote:
 
  Hi,
  
  I've been told to put my getters before my setters when defining Interfaces
  and creating the Class functions...
  
  ... then Bind my getters.
  
  
  Is this a known practice? Any what's the benefit? Is it something to do with
  how Flex calls the getters when setting via the setters?
  
  
  
  Thanks,
  Nick
 





Re: [SPAM] [flexcoders] How to change background color on text input / Linkbar in Flex4

2009-12-16 Thread Ariel J
The Flex 3 Style Explorer is not always valid for Flex 4.

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

 First place I start with styling question is with the Style Explorer:
 
 http://examples.
 http://examples.adobe.com/flex3/consulting/styleexplorer/Flex3StyleExplorer
 .html adobe.com/flex3/consulting/styleexplorer/Flex3StyleExplorer.html
 
  
 
  
 
 Tracy Spratt,
 
 Lariat Services, development services available
 
   _  
 
 From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
 Behalf Of boy_trike
 Sent: Wednesday, December 16, 2009 11:15 AM
 To: flexcoders@yahoogroups.com
 Subject: [SPAM] [flexcoders] How to change background color on text input /
 Linkbar in Flex4
 
  
 
   
 
 I must be a dummy! I can not figure out how to change the lovely white
 background on either of these controls. Help please.
 
 Thank you
 Bruce





[flexcoders] Re: Clarification in including libraries

2009-12-15 Thread Ariel J
When you add libaries via Library Path, they are only compiled into the swf if 
they are used/referenced in your code. This keeps swf's smaller by only adding 
Flex code that is needed. For example, why compile into your swf the code for 
Advanced Data Grid if you never use it.

However, since you don't necessarily reference any of the automation api 
directly in your app, using the Library Path won't work, because it will be 
excluded from your swf. To get those automation libraries in there for an 
external swf to use, you use the include-libraries compiler option which 
ignores if a library is actually used in the code and includes the full library 
into the swf anyway.

--- In flexcoders@yahoogroups.com, shameer.forflex shameer.forf...@... 
wrote:

 Hi All,
 
 I want to make a flex application testable using QTP. I am using the same 
 code for production and testing. In the project properties-Flex Build 
 Path-Library Path, the auto libs such as automation.swc, 
 automation_agent.swc etc are added(merged into code), the moment I create the 
 Project. But to associate the auto libs with the flex application, I have to 
 add them again as Compiler options or at run time. So can anyone please 
 explain me the difference between adding these libs in Flex Build 
 Path-Library Path and adding libraries as Flex Compiler options.
 
 Thanks,
 Shameer





[flexcoders] nightly sdk - automation libs

2009-12-15 Thread Ariel J
should the nightly sdk 4.0 builds include the automation libs?



[flexcoders] Re: replicating Flex build with ant script

2009-12-15 Thread Ariel J
needed to add this to the build script:

static-link-runtime-shared-libraries=true



--- In flexcoders@yahoogroups.com, Ariel J arielj...@... wrote:

 I am trying to reproduce the standard build with an ant script to prepare for 
 future customizations, but when I compile I am getting a SWF with a 
 drastically different size that won't run. Can anyone spot an error in my 
 script? Here is my current ant target:
 
 mxmlc file=${src}/Main.mxml 
   output=${bin-test}/Main.swf 
   debug=true 
   optimize=true 
   incremental=true 
   locale=en_US 
   configname=flex 
   show-unused-type-selector-warnings=false 
   show-actionscript-warnings=false 
   show-binding-warnings=false 
   show-deprecation-warnings=false
   
   compiler.context-root/Main/compiler.context-root 
   source-path path-element=${src} / 
   source-path path-element=${assets} /
   library-path dir=${FLEX_HOME}/frameworks/libs 
 append=true
   include name=*.swc / 
   /library-path
   library-path dir=${FLEX_HOME}/frameworks/locale 
 append=true
   include name={locale} / 
   /library-path
   library-path dir=${lib} append=true
   include name=*.swc / 
   /library-path
   library-path dir=${extras}/MVCS/bin append=true
   include name=MVCS.swc / 
   /library-path
   library-path dir=${extras}/ThirdPartyLibs/bin 
 append=true
   include name=ThirdPartyLibs.swc / 
   /library-path
   
   arg line=-load-config 
 ${FLEX_HOME}/frameworks/flex-config.xml / 
   /mxmlc





[flexcoders] flex 4 skins + presentation model

2009-12-15 Thread Ariel J
Can anyone suggest how to merge these? The issue is that the presenation model 
is not necessarily available when the skin parts are added in partAdded() which 
is where skin parts tend to be integrated. Does it involve a lot of 
BindingUtils? How are people doing this? 



[flexcoders] Re: Beginner Event Question

2009-12-14 Thread Ariel J
FlexBuilder sees this:

[Event(name=ConfigFileEvent, type=event.ConfigFileEvent)]


And automatically creates a code complete version CONFIG_FILE_EVENT even if it 
doesn't exist. It's always been that way. Either create the constant yourself, 
or ignore the code completion and write ConfigFileEvent.


--- In flexcoders@yahoogroups.com, Raymond Brown silenttr...@... wrote:

 I created a custom event to pass a string with, shown here:
 
 package events
 {
 import flash.events.Event;
 public class ConfigFileEvent extends Event
 {
 public var configFile:String;
 public function ConfigFileEvent(type:String, configFile:String)
 {
 super(type);
 this.configFile = configFile;
 }
 override public function clone():Event {
 return new ConfigFileEvent(type, configFile);
 }
 }
 }
 
 I then have in my main class an event metadata tag, a dispatch and event 
 listener shown here:
 
 ?xml version=1.0 encoding=utf-8?
 mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; 
 creationComplete=initApp() 
 mx:Metadata
 [Event(name=ConfigFileEvent, type=event.ConfigFileEvent)]
 /mx:Metadata
 mx:Script
 ![CDATA[
 import event.ConfigFileEvent;
 import events.ConfigFileEvent;
 private function initApp(): void {
 //simulate the getting of a config file from RO and once done sending out the 
 event;
 var temp:String = This works;
 var myConfigFileEvent:ConfigFileEvent = new 
 ConfigFileEvent(ConfigFileEvent, temp);
 dispatchEvent(myConfigFileEvent);
 //now register to listen for the event
 this.addEventListener(ConfigFileEvent.CONFIG_FILE_EVENT, eventCalled);
 }
 private function eventCalled(event:ConfigFileEvent): void {
 //
 }
 ]]
 /mx:Script
 /mx:Application
 
 
  However Flex builder won't compile because of the error:
 
 Access of possibly undefined property CONFIG_FILE_EVENT through a reference 
 with static type Class. in the addEventListener line.  Can someone provide a 
 better insight as to this error and what it is that I am doing wrong?





[flexcoders] replicating Flex build with ant script

2009-12-09 Thread Ariel J
I am trying to reproduce the standard build with an ant script to prepare for 
future customizations, but when I compile I am getting a SWF with a drastically 
different size that won't run. Can anyone spot an error in my script? Here is 
my current ant target:

mxmlc file=${src}/Main.mxml 
output=${bin-test}/Main.swf 
debug=true 
optimize=true 
incremental=true 
locale=en_US 
configname=flex 
show-unused-type-selector-warnings=false 
show-actionscript-warnings=false 
show-binding-warnings=false 
show-deprecation-warnings=false

compiler.context-root/Main/compiler.context-root 
source-path path-element=${src} / 
source-path path-element=${assets} /
library-path dir=${FLEX_HOME}/frameworks/libs 
append=true
include name=*.swc / 
/library-path
library-path dir=${FLEX_HOME}/frameworks/locale 
append=true
include name={locale} / 
/library-path
library-path dir=${lib} append=true
include name=*.swc / 
/library-path
library-path dir=${extras}/MVCS/bin append=true
include name=MVCS.swc / 
/library-path
library-path dir=${extras}/ThirdPartyLibs/bin 
append=true
include name=ThirdPartyLibs.swc / 
/library-path

arg line=-load-config 
${FLEX_HOME}/frameworks/flex-config.xml / 
/mxmlc



[flexcoders] flex 4 and descendant CSS selectors

2009-11-24 Thread Ariel J
i have a css stylesheet applied to my component like this:

#mySitesList #scroller #verticalScrollBar {
skinClass: 
ClassReference(com.safepage.view.mysitespanel.scrollbar.VScrollBarSkin);
}

in my component i have a list whose id is mySitesList.

the item renderers used in mySitesList list also contain List components. The 
secondary lists are being affected by the style above by having their 
scrollbars changed. Is that expected? 



[flexcoders] Re: global error handling flash player 10/flex 4

2009-11-18 Thread Ariel J
Thanks for the responses.

It's just weird that, with the error handling disabled in current builds, 
ErrorEvents that have no listeners are being directed to the debug popup window 
already.

--- In flexcoders@yahoogroups.com, Chris zomgfore...@... wrote:

 From the release notes:
 
 
 The Global error handler is
 disabled in the current build, but will be available in a future beta
 refresh of Flash Player 10.1
 
 http://labs.adobe.com/technologies/flashplayer10/releasenotes.pdf
 
 So it looks like next release. :(
 
 On Tue, Nov 17, 2009 at 5:57 PM, Ariel J arielj...@... wrote:
 
 
 
  I have started seeing the automatic popup window for ErrorEvents that are
  getting dispatched in my program. I want to suppress the window.
 
  I cannot find an example of the definition of a global error handler for a
  Flex app. Can anyone help me out?
 
   
 





[flexcoders] global error handling flash player 10/flex 4

2009-11-17 Thread Ariel J
I have started seeing the automatic popup window for ErrorEvents that are 
getting dispatched in my program. I want to suppress the window.

I cannot find an example of the definition of a global error handler for a Flex 
app. Can anyone help me out?



[flexcoders] animating resize to expose child component

2009-11-12 Thread Ariel J
I am trying to write a custom container that can be handed a child component, 
add it to the display list, and animate its own height from 0 to the height of 
the child component so as to reveal it.

Problem is, what do i set as the resize effect's heightTo value? I am trying to 
call validateSize() on the child component before initializing and running the 
resize effect from 0 to the child component's getExplicitOrMesuredHeight() 
value but it is not working.

What am I doing wrong?