Re: [flexcoders] windows 8 store app onscreen keyboard invoking

2012-09-21 Thread Wouter Schreuders
ah ok. I set up a test where I added accessibility properties to the
sprite. Doesn't invoke the keyboard in metro :(

I've also traced out  Accessibility.active onto a textfield in metro and it
returns false.

Here's the added code:

private function init():void
{
drawSprite(); // Does not invoke Metro soft Keyboard
 drawSpriteWithEventHandler(); // Does not invoke Metro soft Keyboard
drawTextField(); // Does not invoke Metro soft Keyboard
 drawInputTextField(); // successfully invokes Metro soft Keyboard
 setTimeout(updateAccessibility, 2000);
 }
 private function updateAccessibility():void {
 console.text += "Accessibility.active: " + Accessibility.active+'\n';
if(Accessibility.active) {
 Accessibility.updateProperties();
}
}

private function drawSpriteWithEventHandler():void
{
textInputEH = new Sprite();
 textInputEH.x  = 100;
textInputEH.y = 200;
var g:Graphics = textInputEH.graphics;
 g.beginFill(0x22ff00, 1);
g.drawRect(0,0,200,80);
g.endFill();
 addChild(textInputEH);
textInputEH.buttonMode = true;
textInputEH.addEventListener(MouseEvent.CLICK, function
(event:MouseEvent):void
 {
console.text += event.currentTarget+'\n';
} );
 addEventListener(Event.ADDED, addedHandler);
var accessProps:AccessibilityProperties = new AccessibilityProperties();
 accessibilityProperties = accessProps;
}
 private function addedHandler(event:Event):void {
console.text += "addedHandler: " + name+'\n';
 var accessProps:AccessibilityProperties = new AccessibilityProperties();
accessProps.name = 'spriteWithAccessability';
 accessProps.description = 'textbox';
textInputEH.accessibilityProperties = accessProps;
 removeEventListener(Event.ADDED, addedHandler);
}



On 20 September 2012 23:26, Alex Harui  wrote:

> **
>
>
> I was more interested if you could get the Sprite to display the keyboard
> by adding accessibility properties to it.
>
>
>
> On 9/20/12 2:45 AM, "Wouter Schreuders"  wrote:
>
>
>
>
>
>
> Hi Alex
>
> Yep, focus definitely does go to the sprite and the stage's focus is set.
> I also outputted all the events that the textinput received (I've excluded
> some overly chatty ones like enterframe) Accessibly is enabled for the
> project and I've added the following to the MXML textInput which seem to no
> difference:
>
> accessibilityEnabled="true" accessibilityName="textbox"
> accessibilityDescription="textbox"
>
> when I have a universal event listerner I get these events in both
> displayAsPassword enabled and disabled textInputs:
>
> preinitialize
> initialize
> resize
> creationComplete
> activate
> touchBegin
> touchRollOver
> touchOver
> removed
> focusIn
> touchMove
> removed
> touchMove
> touchEnd
> touchTap
> touchOut
> touchRollOut
> click
>
>
>
>
> On 19 September 2012 19:44, Alex Harui  wrote:
>
> stage.focus
>
>
>
>
>
>
>
> --
> Alex Harui
> Flex SDK Team
> Adobe Systems, Inc.
> http://blogs.adobe.com/aharui
>
>  
>


Re: [flexcoders] windows 8 store app onscreen keyboard invoking

2012-09-20 Thread Wouter Schreuders
Hi Alex

Yep, focus definitely does go to the sprite and the stage's focus is set. I
also outputted all the events that the textinput received (I've excluded
some overly chatty ones like enterframe) Accessibly is enabled for the
project and I've added the following to the MXML textInput which seem to no
difference:

accessibilityEnabled="true" accessibilityName="textbox"
accessibilityDescription="textbox"

when I have a universal event listerner I get these events in both
displayAsPassword enabled and disabled textInputs:

preinitialize
initialize
resize
creationComplete
activate
touchBegin
touchRollOver
touchOver
removed
focusIn
touchMove
removed
touchMove
touchEnd
touchTap
touchOut
touchRollOut
click




On 19 September 2012 19:44, Alex Harui  wrote:

> stage.focus


Re: [flexcoders] windows 8 store app onscreen keyboard invoking

2012-09-19 Thread Wouter Schreuders
Hi Alex

I'm using Flex SDK 4.5A (problem also occurs on 4.6)
The flash player is version 11.3.372.94 on windows 8 64 bit and as far as I
know IE have gone the same route as flash and rolled their own version of
the flash player inside the browser.

Metro officially supports flash sites that comply with their conditions as
set out here (
http://msdn.microsoft.com/en-us/library/ie/jj193557%28v=vs.85%29.aspx )

Microsoft's official policy on invoking the keyboard is that it must be
under the control of the user and can not be problematically invoked. The
way to invoke the keyboard is one of the following from this page (
http://msdn.microsoft.com/en-us/library/windows/apps/hh465404.aspx ) :

Accessibility properties from UI Automation (UIA)
User tap
Focus changes

from their docs : *UI Automation is the mechanism through which developers
communicate whether or not a particular UI element can receive text input.
You must ensure that the appropriate accessibility properties are set in
your apps so that the touch keyboard will know to appear when focus lands
on a specific UI element.*
*
*
Their own windows provided controls do this automatically otherwise inside
of your html you need to add the following:


So  that's how it works in html. I haven't found any documentation of help
on forums explaining how they decide when to bring up the keyboard in a
flash situation.

As you suggested I made an AS only site to see what works and what doesn't.
a normal sprite doesn't invoke the keyboard, neither does a sprite with a
mouse click listener. A normal textField doesn't invoke the keyboard but a
textfield with type set to TextFieldType.INPUT does invoke the keyboard
(which makes sense)

So somehow microsoft (I'm guessing) are inside of flash detecting what kind
of component recieved focus and if it's a editable textfield then it does
bring up the keyboard.

The intriguing thing is that for some reason when a spark textInput /
RichEditableText is set to displayAsPassword = true it DOES bring up the
keyboard so perhaps somewhere in the framework setting that flag causes the
component to somehow be perceived as a input component which quite strange
to me since I can't see why setting that condition would make any
difference.

Here's my test code:


package
{
import flash.display.Graphics;
import flash.display.Sprite;
 import flash.display.StageAlign;
import flash.display.StageQuality;
import flash.display.StageScaleMode;
 import flash.events.Event;
import flash.events.MouseEvent;
import flash.text.TextField;
 import flash.text.TextFieldType;
 public class CleanAsProject extends Sprite
 {
public function CleanAsProject()
{
 stage.scaleMode = StageScaleMode.NO_SCALE; //this stuff is required since
I'm working in flash builder and if you you don't put it in your graphics
scale is whack
 stage.align = StageAlign.TOP_LEFT;
stage.quality = StageQuality.HIGH;
 init();
}
 private function init():void
{
drawSprite(); // Does not invoke Metro soft Keyboard
 drawSpriteWithEventHandler(); // Does not invoke Metro soft Keyboard
drawTextField(); // Does not invoke Metro soft Keyboard
 drawInputTextField(); // successfully invokes Metro soft Keyboard
}
 private function drawTextField():void
{
var textField:TextField = new TextField;
 addChild(textField);
textField.x  = 100;
textField.y = 300;
 textField.height = 50;
textField.text = 'click me';
}
 private function drawInputTextField():void
{
 var textField:TextField = new TextField;
addChild(textField);
textField.x  = 100;
 textField.y = 350;
textField.height = 50;
textField.text = 'input text into me';
 textField.type = TextFieldType.INPUT;
textField.background = true;
}
 private function drawSpriteWithEventHandler():void
{
 var textInputEH:Sprite = new Sprite();
textInputEH.x  = 100;
 textInputEH.y = 200;
var g:Graphics = textInputEH.graphics;
g.beginFill(0x44ff00, 1);
 g.drawRect(0,0,200,80);
g.endFill();
addChild(textInputEH);
 textInputEH.buttonMode = true;
textInputEH.addEventListener(MouseEvent.CLICK, function
(event:MouseEvent):void
 {
trace(event.currentTarget);
} );
 }
  private function drawSprite():void
{
var textInput:Sprite = new Sprite();
 textInput.x  = 100;
textInput.y = 100;
var g:Graphics = textInput.graphics;
 g.beginFill(0xff9900, 1);
g.drawRect(0,0,200,80);
g.endFill();
 addChild(textInput);
}
 }
}


On 19 September 2012 07:59, Alex Harui  wrote:

> **
>
>
> I would break it down to an AS-only test where you set focus to a Sprite
> and see if you get the keyboard.
>
> Which version of player are you using?  Is metro officially supported?
>
>
>
> On 9/18/12 1:11 PM, "Wouter Schreuders"  wrote:
>
>
>
>
>
>
> Hi Alex
>
> The problem occurs with the spark RichEditableText therefore
> also textInput (not for MX:textInput). I set up a little test inside of
> windows 8 metro where traced out all the events for 

Re: [flexcoders] windows 8 store app onscreen keyboard invoking

2012-09-18 Thread Wouter Schreuders
Hi Alex

The problem occurs with the spark RichEditableText therefore also textInput
(not for MX:textInput). I set up a little test inside of windows 8 metro
where traced out all the events for both a normal textInput and a textInput
with displayAsPassword="true" and they are firing identical events. The one
with displayAsPassword="true" invokes the keyboard perfectly everytime.
I've also extended the RichEditableText class and overwritten some of the
methods that are dependant on the displayAsPassword flag to see if that
makes any difference but no luck.


On 18 September 2012 21:50, Alex Harui  wrote:

> **
>
>
> Spark or MX?  If Spark, then maybe they can’t handle non-TextFields
> getting focus?
>
>
>
> On 9/17/12 8:33 AM, "Wouter Schreuders"  wrote:
>
>
>
>
>
>
> Hi All
>
> I'm busy testing our application in the windows 8 store app browser and
> I've noticed that the keyboard automatically appears when you click on a
> flash text input but not when you click on a flex text input. I'm guessing
> that MS are doing some kind of event detection which invokes the onscreen
> keyboard but that they didn't do the same thing for flex text inputs. I've
> also checked it seems that one cannot invoke the keyboard manually with
> javascript.
>
> Has anyone run into this problem before and found a solution? I've also
> noticed that it DOES bring up the keyboard if you have set
> displayAsPassword="true" for some reason.
>
> Has anyone got any idea why this is happening and how I can work
> around/solve it?
>
> Thanks
>
> Wouter
>
>
>
>
>
>
> --
> Alex Harui
> Flex SDK Team
> Adobe Systems, Inc.
> http://blogs.adobe.com/aharui
>
>  
>


[flexcoders] windows 8 store app onscreen keyboard invoking

2012-09-17 Thread Wouter Schreuders
Hi All

I'm busy testing our application in the windows 8 store app browser and
I've noticed that the keyboard automatically appears when you click on a
flash text input but not when you click on a flex text input. I'm guessing
that MS are doing some kind of event detection which invokes the onscreen
keyboard but that they didn't do the same thing for flex text inputs. I've
also checked it seems that one cannot invoke the keyboard manually with
javascript.

Has anyone run into this problem before and found a solution? I've also
noticed that it DOES bring up the keyboard if you have
set displayAsPassword="true" for some reason.

Has anyone got any idea why this is happening and how I can work
around/solve it?

Thanks

Wouter


Re: [flexcoders] Re: datagrid not rendering after dataprovider update

2012-05-03 Thread Wouter Schreuders
Thanks Alex

Your workaround works perfectly,

I've filed the bug here : http://bugs.adobe.com/jira/browse/SDK-32172

Thanks again

Wouter

On 28 April 2012 08:34, Alex H  wrote:

> **
>
>
> Looks like there are a couple of bugs in there. File the bugs against
> Adobe if you have an Adobe support contract, otherwise file against Apache
> Flex.
>
> I used the following hack in applyDateFilter that appears to work. If you
> don't change the scrollposition, it doesn't cause a full update of the
> screen.
>
> var oldvsp:Number = dgTransactions.grid.verticalScrollPosition;
> _dateFilteredCollection = new ArrayCollection(dateFilteredArray);
> applySort();
> applySearch();
> dgTransactions.grid.verticalScrollPosition = oldvsp + .1;
> dgTransactions.grid.verticalScrollPosition = oldvsp;
>
> -Alex
>
>
> --- In flexcoders@yahoogroups.com, Wouter Schreuders 
> wrote:
> >
> > Hi Alex
> >
> > To replicate the problem.
> >
> > - launch the app (it will populate the datagrid with values)
> >
> > - choose a different date in the date picker on the top left
> >
> > - the dataprovider will get updated but the datagrid doesn't update
> > properly, instead it just remains blank
> >
> > - use the scroller on the right-hand side to scroll through the datagrid,
> > the datagrid will then render properly
> >
> > Thanks
> >
> > Wouter
> >
> > On 26 April 2012 08:37, Alex Harui  wrote:
> >
> > > **
>
> > >
> > >
> > > What are the steps to reproduce the problem?
> > >
> > >
> > >
> > > On 4/20/12 12:54 AM, "Wouter Schreuders"  wrote:
> > >
> > >
> > >
> > >
> > >
> > >
> > > I've made a simple test case in which I can replicate the problem. If
> > > anyone feels like having a look you can download it here:
> > >
> > > http://www.filefactory.com/file/6oz4m4wrkx31/n/DataGridRender_zip
> > >
> > >
> > >
> > > On 4 April 2012 23:12, Alex Harui  wrote:
> > >
> > >
> > >
> > >
> > >
> > >
> > > Do you have a simple test case?
> > >
> > >
> > >
> > >
> > > On 4/4/12 8:43 AM, "Wouter Schreuders" 
> > > http://wschreuders@...> > wrote:
> > >
> > >
> > >
> > >
> > >
> > >
> > > spark DG
> > >
> > >
> > > On 4 April 2012 17:28, Alex Harui 
> > > http://aharui@...> > wrote:
> > >
> > >
> > >
> > >
> > >
> > >
> > > MX or Spark DG?
> > >
> > >
> > >
> > >
> > >
> > >
> > > On 4/4/12 12:05 AM, "Wouter Schreuders" 
> > > http://wschreuders@...> <http://wschreuders@...> > wrote:
> > >
> > >
> > >
> > >
> > >
> > >
> > > I thought that that may be the case, so I removed all my custom
> > > itemrenderers but the problem remains, I've also noticed that the
> problem
> > > only occurs after I have entered a date range, if I stick with the
> standard
> > > date range then problem doesn't occur.
> > >
> > > On 3 April 2012 22:23, Alex Harui 
> > > http://aharui@...> <http://aharui@...> > wrote:
> > >
> > >
> > >
> > >
> > >
> > >
> > > That sounds more like an issue with custom renderers.
> > >
> > >
> > >
> > >
> > > On 4/3/12 4:47 AM, "Wouter Schreuders"  > > http://wschreuders@...> <http://wschreuders@...> <
>
> > > http://wschreuders@...> > wrote:
> > >
> > >
> > >
> > >
> > >
> > >
> > > Hi All
> > >
> > > I've run into a rendering problem with the datagrid.
> > >
> > > I have a datagrid that a user can search using a date range,
> furthermore
> > > the user can also search using keywords. I do this by first looking at
> the
> > > date range and applying a filter to the array of objects based on the
> > > dates. Then I make of a copy of that arraycollection and assign the
> > > arraycollection which binds to my datagrid to that collection.
> > >
> > > The problem is that when the user selects a date range and I apply the
> > > filter, the datagrid content disappears. The scrollbar on the side
> updates
> > > though and if I scroll down then the content appears and renders
> correctly.
> > > I've tried the following post refresh commands but none of them solve
> the
> > > problem.
> > >
> > > (datagrid.dataProvider as ArrayCollection).refresh();
> > > datagrid .invalidateSkinState();
> > > datagrid .invalidateDisplayList();
> > > datagrid .validateNow();
> > >
> > > Here's the code where I get the date range.
> > >
> > > var dateFilteredArray:Array = _transactions.source.filter(
> > > function (item:Transaction, index:int, array:Array):Boolean
> > > {
> > > if(Date.parse(item.displayDate) <
> dateRangeComponent.startDate.valueOf()
> > > || Date.parse(item.displayDate) > dateRangeComponent.endDate.valueOf())
> > > return false
> > > else
> > > return true //item is inside date range
> > > }
> > > );
> > > _dateFilteredCollection = new ArrayCollection(dateFilteredArray);
> > >
> > > Anyone run into this before?
> > >
> > >
> > >
> > >
> > >
> > > --
> > > Alex Harui
> > > Flex SDK Team
> > > Adobe Systems, Inc.
> > > http://blogs.adobe.com/aharui
> > >
> > >
> > >
> >
>
>  
>


Re: [flexcoders] datagrid not rendering after dataprovider update

2012-04-26 Thread Wouter Schreuders
Hi Alex

To replicate the problem.

- launch the app (it will populate the datagrid with values)

- choose a different date in the date picker on the top left

- the dataprovider will get updated but the datagrid doesn't update
properly, instead it just remains blank

- use the scroller on the right-hand side to scroll through the datagrid,
the datagrid will then render properly

Thanks

Wouter

On 26 April 2012 08:37, Alex Harui  wrote:

> **
>
>
> What are the steps to reproduce the problem?
>
>
>
> On 4/20/12 12:54 AM, "Wouter Schreuders"  wrote:
>
>
>
>
>
>
> I've made a simple test case in which I can replicate the problem. If
> anyone feels like having a look you can download it here:
>
> http://www.filefactory.com/file/6oz4m4wrkx31/n/DataGridRender_zip
>
>
>
> On 4 April 2012 23:12, Alex Harui  wrote:
>
>
>
>
>
>
> Do you have a simple test case?
>
>
>
>
> On 4/4/12 8:43 AM, "Wouter Schreuders"  http://wschreud...@gmail.com> > wrote:
>
>
>
>
>
>
> spark DG
>
>
> On 4 April 2012 17:28, Alex Harui  http://aha...@adobe.com> > wrote:
>
>
>
>
>
>
> MX or Spark DG?
>
>
>
>
>
>
> On 4/4/12 12:05 AM, "Wouter Schreuders"  http://wschreud...@gmail.com>  <http://wschreud...@gmail.com> > wrote:
>
>
>
>
>
>
> I thought that that may be the case, so I removed all my custom
> itemrenderers but the problem remains, I've also noticed that the problem
> only occurs after I have entered a date range, if I stick with the standard
> date range then problem doesn't occur.
>
> On 3 April 2012 22:23, Alex Harui  http://aha...@adobe.com>  <http://aha...@adobe.com> > wrote:
>
>
>
>
>
>
> That sounds more like an issue with custom renderers.
>
>
>
>
> On 4/3/12 4:47 AM, "Wouter Schreuders"  http://wschreud...@gmail.com>  <http://wschreud...@gmail.com>  <
> http://wschreud...@gmail.com> > wrote:
>
>
>
>
>
>
> Hi All
>
> I've run into a rendering problem with the datagrid.
>
> I have a datagrid that a user can search using a date range, furthermore
> the user can also search using keywords. I do this by first looking at the
> date range and applying a filter to the array of objects based on the
> dates. Then I make of a copy of that arraycollection and assign the
> arraycollection which binds to my datagrid to that collection.
>
> The problem is that when the user selects a date range and I apply the
> filter, the datagrid content disappears. The scrollbar on the side updates
> though and if I scroll down then the content appears and renders correctly.
> I've tried the following post refresh commands but none of them solve the
> problem.
>
> (datagrid.dataProvider as ArrayCollection).refresh();
> datagrid .invalidateSkinState();
> datagrid .invalidateDisplayList();
> datagrid .validateNow();
>
> Here's the code where I get the date range.
>
> var dateFilteredArray:Array = _transactions.source.filter(
> function (item:Transaction, index:int, array:Array):Boolean
> {
> if(Date.parse(item.displayDate) < dateRangeComponent.startDate.valueOf()
> || Date.parse(item.displayDate) > dateRangeComponent.endDate.valueOf())
> return false
> else
> return true //item is inside date range
> }
> );
> _dateFilteredCollection = new ArrayCollection(dateFilteredArray);
>
> Anyone run into this before?
>
>
>
>
>
> --
> Alex Harui
> Flex SDK Team
> Adobe Systems, Inc.
> http://blogs.adobe.com/aharui
>
>  
>


Re: [flexcoders] datagrid not rendering after dataprovider update

2012-04-20 Thread Wouter Schreuders
I've made a simple test case in which I can replicate the problem. If
anyone feels like having a look you can download it here:

http://www.filefactory.com/file/6oz4m4wrkx31/n/DataGridRender_zip



On 4 April 2012 23:12, Alex Harui  wrote:

> **
>
>
> Do you have a simple test case?
>
>
>
> On 4/4/12 8:43 AM, "Wouter Schreuders"  wrote:
>
>
>
>
>
>
> spark DG
>
> On 4 April 2012 17:28, Alex Harui  wrote:
>
>
>
>
>
>
> MX or Spark DG?
>
>
>
>
>
> On 4/4/12 12:05 AM, "Wouter Schreuders"  http://wschreud...@gmail.com> > wrote:
>
>
>
>
>
>
> I thought that that may be the case, so I removed all my custom
> itemrenderers but the problem remains, I've also noticed that the problem
> only occurs after I have entered a date range, if I stick with the standard
> date range then problem doesn't occur.
>
> On 3 April 2012 22:23, Alex Harui  http://aha...@adobe.com> > wrote:
>
>
>
>
>
>
> That sounds more like an issue with custom renderers.
>
>
>
>
> On 4/3/12 4:47 AM, "Wouter Schreuders"  http://wschreud...@gmail.com>  <http://wschreud...@gmail.com> > wrote:
>
>
>
>
>
>
> Hi All
>
> I've run into a rendering problem with the datagrid.
>
> I have a datagrid that a user can search using a date range, furthermore
> the user can also search using keywords. I do this by first looking at the
> date range and applying a filter to the array of objects based on the
> dates. Then I make of a copy of that arraycollection and assign the
> arraycollection which binds to my datagrid to that collection.
>
> The problem is that when the user selects a date range and I apply the
> filter, the datagrid content disappears. The scrollbar on the side updates
> though and if I scroll down then the content appears and renders correctly.
> I've tried the following post refresh commands but none of them solve the
> problem.
>
> (datagrid.dataProvider as ArrayCollection).refresh();
> datagrid .invalidateSkinState();
> datagrid .invalidateDisplayList();
> datagrid .validateNow();
>
> Here's the code where I get the date range.
>
> var dateFilteredArray:Array = _transactions.source.filter(
> function (item:Transaction, index:int, array:Array):Boolean
> {
> if(Date.parse(item.displayDate) < dateRangeComponent.startDate.valueOf()
> || Date.parse(item.displayDate) > dateRangeComponent.endDate.valueOf())
> return false
> else
> return true //item is inside date range
> }
> );
> _dateFilteredCollection = new ArrayCollection(dateFilteredArray);
>
> Anyone run into this before?
>
>
>
>
>
> --
> Alex Harui
> Flex SDK Team
> Adobe Systems, Inc.
> http://blogs.adobe.com/aharui
>
>  
>


Re: [flexcoders] datagrid not rendering after dataprovider update

2012-04-05 Thread Wouter Schreuders
I'll put one together now and see if I can replicate it

On 4 April 2012 23:12, Alex Harui  wrote:

> **
>
>
> Do you have a simple test case?
>
>
>
> On 4/4/12 8:43 AM, "Wouter Schreuders"  wrote:
>
>
>
>
>
>
> spark DG
>
> On 4 April 2012 17:28, Alex Harui  wrote:
>
>
>
>
>
>
> MX or Spark DG?
>
>
>
>
>
> On 4/4/12 12:05 AM, "Wouter Schreuders"  http://wschreud...@gmail.com> > wrote:
>
>
>
>
>
>
> I thought that that may be the case, so I removed all my custom
> itemrenderers but the problem remains, I've also noticed that the problem
> only occurs after I have entered a date range, if I stick with the standard
> date range then problem doesn't occur.
>
> On 3 April 2012 22:23, Alex Harui  http://aha...@adobe.com> > wrote:
>
>
>
>
>
>
> That sounds more like an issue with custom renderers.
>
>
>
>
> On 4/3/12 4:47 AM, "Wouter Schreuders"  http://wschreud...@gmail.com>  <http://wschreud...@gmail.com> > wrote:
>
>
>
>
>
>
> Hi All
>
> I've run into a rendering problem with the datagrid.
>
> I have a datagrid that a user can search using a date range, furthermore
> the user can also search using keywords. I do this by first looking at the
> date range and applying a filter to the array of objects based on the
> dates. Then I make of a copy of that arraycollection and assign the
> arraycollection which binds to my datagrid to that collection.
>
> The problem is that when the user selects a date range and I apply the
> filter, the datagrid content disappears. The scrollbar on the side updates
> though and if I scroll down then the content appears and renders correctly.
> I've tried the following post refresh commands but none of them solve the
> problem.
>
> (datagrid.dataProvider as ArrayCollection).refresh();
> datagrid .invalidateSkinState();
> datagrid .invalidateDisplayList();
> datagrid .validateNow();
>
> Here's the code where I get the date range.
>
> var dateFilteredArray:Array = _transactions.source.filter(
> function (item:Transaction, index:int, array:Array):Boolean
> {
> if(Date.parse(item.displayDate) < dateRangeComponent.startDate.valueOf()
> || Date.parse(item.displayDate) > dateRangeComponent.endDate.valueOf())
> return false
> else
> return true //item is inside date range
> }
> );
> _dateFilteredCollection = new ArrayCollection(dateFilteredArray);
>
> Anyone run into this before?
>
>
>
>
>
> --
> Alex Harui
> Flex SDK Team
> Adobe Systems, Inc.
> http://blogs.adobe.com/aharui
>
>  
>


Re: [flexcoders] datagrid not rendering after dataprovider update

2012-04-04 Thread Wouter Schreuders
spark DG

On 4 April 2012 17:28, Alex Harui  wrote:

> **
>
>
> MX or Spark DG?
>
>
>
> On 4/4/12 12:05 AM, "Wouter Schreuders"  wrote:
>
>
>
>
>
>
> I thought that that may be the case, so I removed all my custom
> itemrenderers but the problem remains, I've also noticed that the problem
> only occurs after I have entered a date range, if I stick with the standard
> date range then problem doesn't occur.
>
> On 3 April 2012 22:23, Alex Harui  wrote:
>
>
>
>
>
>
> That sounds more like an issue with custom renderers.
>
>
>
>
> On 4/3/12 4:47 AM, "Wouter Schreuders"  http://wschreud...@gmail.com> > wrote:
>
>
>
>
>
>
> Hi All
>
> I've run into a rendering problem with the datagrid.
>
> I have a datagrid that a user can search using a date range, furthermore
> the user can also search using keywords. I do this by first looking at the
> date range and applying a filter to the array of objects based on the
> dates. Then I make of a copy of that arraycollection and assign the
> arraycollection which binds to my datagrid to that collection.
>
> The problem is that when the user selects a date range and I apply the
> filter, the datagrid content disappears. The scrollbar on the side updates
> though and if I scroll down then the content appears and renders correctly.
> I've tried the following post refresh commands but none of them solve the
> problem.
>
> (datagrid.dataProvider as ArrayCollection).refresh();
> datagrid .invalidateSkinState();
> datagrid .invalidateDisplayList();
> datagrid .validateNow();
>
> Here's the code where I get the date range.
>
> var dateFilteredArray:Array = _transactions.source.filter(
> function (item:Transaction, index:int, array:Array):Boolean
> {
> if(Date.parse(item.displayDate) < dateRangeComponent.startDate.valueOf()
> || Date.parse(item.displayDate) > dateRangeComponent.endDate.valueOf())
> return false
> else
> return true //item is inside date range
> }
> );
> _dateFilteredCollection = new ArrayCollection(dateFilteredArray);
>
> Anyone run into this before?
>
>
>
>
>
> --
> Alex Harui
> Flex SDK Team
> Adobe Systems, Inc.
> http://blogs.adobe.com/aharui
>
>  
>


Re: [flexcoders] datagrid not rendering after dataprovider update

2012-04-04 Thread Wouter Schreuders
I thought that that may be the case, so I removed all my custom
itemrenderers but the problem remains, I've also noticed that the problem
only occurs after I have entered a date range, if I stick with the standard
date range then problem doesn't occur.

On 3 April 2012 22:23, Alex Harui  wrote:

> **
>
>
> That sounds more like an issue with custom renderers.
>
>
>
> On 4/3/12 4:47 AM, "Wouter Schreuders"  wrote:
>
>
>
>
>
>
> Hi All
>
> I've run into a rendering problem with the datagrid.
>
> I have a datagrid that a user can search using a date range, furthermore
> the user can also search using keywords. I do this by first looking at the
> date range and applying a filter to the array of objects based on the
> dates. Then I make of a copy of that arraycollection and assign the
> arraycollection which binds to my datagrid to that collection.
>
> The problem is that when the user selects a date range and I apply the
> filter, the datagrid content disappears. The scrollbar on the side updates
> though and if I scroll down then the content appears and renders correctly.
> I've tried the following post refresh commands but none of them solve the
> problem.
>
> (datagrid.dataProvider as ArrayCollection).refresh();
> datagrid .invalidateSkinState();
> datagrid .invalidateDisplayList();
> datagrid .validateNow();
>
> Here's the code where I get the date range.
>
> var dateFilteredArray:Array = _transactions.source.filter(
> function (item:Transaction, index:int, array:Array):Boolean
> {
> if(Date.parse(item.displayDate) < dateRangeComponent.startDate.valueOf()
> || Date.parse(item.displayDate) > dateRangeComponent.endDate.valueOf())
> return false
> else
> return true //item is inside date range
> }
> );
> _dateFilteredCollection = new ArrayCollection(dateFilteredArray);
>
> Anyone run into this before?
>
>
>
>
>
> --
> Alex Harui
> Flex SDK Team
> Adobe Systems, Inc.
> http://blogs.adobe.com/aharui
>
>  
>


[flexcoders] datagrid not rendering after dataprovider update

2012-04-03 Thread Wouter Schreuders
Hi All

I've run into a rendering problem with the datagrid.

I have a datagrid that a user can search using a date range, furthermore
the user can also search using keywords. I do this by first looking at the
date range and applying a filter to the array of objects based on the
dates. Then I make of a copy of that arraycollection and assign the
arraycollection which binds to my datagrid to that collection.

The problem is that when the user selects a date range and I apply the
filter, the datagrid content disappears. The scrollbar on the side updates
though and if I scroll down then the content appears and renders correctly.
I've tried the following post refresh commands but none of them solve the
problem.

(datagrid.dataProvider as ArrayCollection).refresh();
datagrid .invalidateSkinState();
 datagrid .invalidateDisplayList();
datagrid .validateNow();

Here's the code where I get the date range.

var dateFilteredArray:Array = _transactions.source.filter(
function (item:Transaction, index:int, array:Array):Boolean
{
if(Date.parse(item.displayDate) < dateRangeComponent.startDate.valueOf() ||
Date.parse(item.displayDate) > dateRangeComponent.endDate.valueOf())
 return false
else
 return true //item is inside date range
}
);
_dateFilteredCollection = new ArrayCollection(dateFilteredArray);

Anyone run into this before?


Re: [flexcoders] external debugger

2012-03-26 Thread Wouter Schreuders
Is there any way to exlude this code being compiled into the release
version?

On 26 March 2012 11:20, Wouter Schreuders  wrote:

> great! thanks this is a super handy class
>
>
> On 23 March 2012 16:50, dorkie dork from dorktown <
> dorkiedorkfromdorkt...@gmail.com> wrote:
>
>> **
>>
>>
>> You can use MiniInspector to get that type of information.
>>
>> http://code.google.com/p/flexcapacitor/source/browse/trunk/library/src/com/flexcapacitor/utils/MiniInspector.as
>>
>>
>> On Thu, Feb 9, 2012 at 5:22 AM, Wouter Schreuders 
>> wrote:
>>
>>> **
>>>
>>>
>>> well the kind of functionality I'm looking for is really for the back
>>> end programmers, occasionally they need to dip into the flex side of things
>>> and they have a lot of difficulty figuring out which class they need to
>>> work on(for instance you have your application, then a module, then a
>>> component which contains an itemrenderer which contains another
>>> itemrenderer and on of those has some custom component inside).
>>>
>>> If they can just hover their mouse over that element and it tells them
>>> what class it is it would help them alot.
>>>
>>>
>>> On 9 February 2012 07:17, Alex Harui  wrote:
>>>
>>>> **
>>>>
>>>>
>>>> FDB comes with the SDK.  It is command-line, but I use it 99% of the
>>>> time as it is way faster than the GUI debugger in FlashBuilder for most
>>>> problems I have to solve.
>>>>
>>>>
>>>>
>>>> On 2/7/12 11:06 PM, "Wouter Schreuders"  wrote:
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> Hi All
>>>>
>>>> Can anyone recommend a debugger for flex that allows you to inspect and
>>>> changed properties at runtime? Something like Flex-Spy or x-ray(for as2),
>>>> but I'm looking for something that is not obsolete.
>>>>
>>>> Any recommendations?
>>>>
>>>> Thanks
>>>>
>>>> Wouter
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Alex Harui
>>>> Flex SDK Team
>>>> Adobe Systems, Inc.
>>>> http://blogs.adobe.com/aharui
>>>>
>>>>
>>>
>>  
>>
>
>


Re: [flexcoders] external debugger

2012-03-26 Thread Wouter Schreuders
great! thanks this is a super handy class

On 23 March 2012 16:50, dorkie dork from dorktown <
dorkiedorkfromdorkt...@gmail.com> wrote:

> **
>
>
> You can use MiniInspector to get that type of information.
>
> http://code.google.com/p/flexcapacitor/source/browse/trunk/library/src/com/flexcapacitor/utils/MiniInspector.as
>
>
> On Thu, Feb 9, 2012 at 5:22 AM, Wouter Schreuders 
> wrote:
>
>> **
>>
>>
>> well the kind of functionality I'm looking for is really for the back end
>> programmers, occasionally they need to dip into the flex side of things and
>> they have a lot of difficulty figuring out which class they need to work
>> on(for instance you have your application, then a module, then a component
>> which contains an itemrenderer which contains another itemrenderer and on
>> of those has some custom component inside).
>>
>> If they can just hover their mouse over that element and it tells them
>> what class it is it would help them alot.
>>
>>
>> On 9 February 2012 07:17, Alex Harui  wrote:
>>
>>> **
>>>
>>>
>>> FDB comes with the SDK.  It is command-line, but I use it 99% of the
>>> time as it is way faster than the GUI debugger in FlashBuilder for most
>>> problems I have to solve.
>>>
>>>
>>>
>>> On 2/7/12 11:06 PM, "Wouter Schreuders"  wrote:
>>>
>>>
>>>
>>>
>>>
>>>
>>> Hi All
>>>
>>> Can anyone recommend a debugger for flex that allows you to inspect and
>>> changed properties at runtime? Something like Flex-Spy or x-ray(for as2),
>>> but I'm looking for something that is not obsolete.
>>>
>>> Any recommendations?
>>>
>>> Thanks
>>>
>>> Wouter
>>>
>>>
>>>
>>>
>>>
>>> --
>>> Alex Harui
>>> Flex SDK Team
>>> Adobe Systems, Inc.
>>> http://blogs.adobe.com/aharui
>>>
>>>
>>
>  
>


Re: [flexcoders] external debugger

2012-02-14 Thread Wouter Schreuders
thanks! I'll have a look


2012/2/14 Csomák Gábor 

> **
>
>
> http://demonsterdebugger.com/ is the wery best. i think you'll be happy
> with it.
>
>
> On Thu, Feb 9, 2012 at 12:22 PM, Wouter Schreuders 
> wrote:
>
>>
>>
>> well the kind of functionality I'm looking for is really for the back end
>> programmers, occasionally they need to dip into the flex side of things and
>> they have a lot of difficulty figuring out which class they need to work
>> on(for instance you have your application, then a module, then a component
>> which contains an itemrenderer which contains another itemrenderer and on
>> of those has some custom component inside).
>>
>> If they can just hover their mouse over that element and it tells them
>> what class it is it would help them alot.
>>
>>
>> On 9 February 2012 07:17, Alex Harui  wrote:
>>
>>>
>>>
>>> FDB comes with the SDK.  It is command-line, but I use it 99% of the
>>> time as it is way faster than the GUI debugger in FlashBuilder for most
>>> problems I have to solve.
>>>
>>>
>>>
>>> On 2/7/12 11:06 PM, "Wouter Schreuders"  wrote:
>>>
>>>
>>>
>>>
>>>
>>>
>>> Hi All
>>>
>>> Can anyone recommend a debugger for flex that allows you to inspect and
>>> changed properties at runtime? Something like Flex-Spy or x-ray(for as2),
>>> but I'm looking for something that is not obsolete.
>>>
>>> Any recommendations?
>>>
>>> Thanks
>>>
>>> Wouter
>>>
>>>
>>>
>>>
>>>
>>> --
>>> Alex Harui
>>> Flex SDK Team
>>> Adobe Systems, Inc.
>>> http://blogs.adobe.com/aharui
>>>
>>
>>
>  
>


Re: [flexcoders] different handling of mouseWheelEvents in internet explorer and firefox/Chrome

2012-02-10 Thread Wouter Schreuders
it's the same version of flash player(11.1.102.55)

On 9 February 2012 21:22, Rishi Tandon  wrote:

> **
>
>
> Have u checked the version of flash player plugin installed for IE?
>
> Sent from my iPad
>
> On 09-Feb-2012, at 5:26 PM, Wouter Schreuders 
> wrote:
>
>
>
> Hi All
>
> I've been having problems with the amount of scrolling that happens when
> you use the mouse-wheel with VScrollBar. I came up with two possible
> solutions(well actually my co-worked came up with the one and I came up
> with the other), one is to prevent the default behaviour of the
> mouseWheelChanging event. The other was to extend the vScrollbar class and
> overwrite some functionality inside it. Both implementations are below. The
> problem is that while both of these solutions work inside of firefox and
> chrome, they don't seem to work in IE9, I'm guessing that IE9 is somehow
> sending mouse-wheel events differently to the way it's done with the
> flashplayer in the other browsers.
>
> Has anyone encountered this before and know of a workaround?
>
> Thanks
>
> Wouter
>
> like so:
>
>
> ---MXML-
>  id="vScrollBar" viewport="{grpContent}" 
> mouseWheelChanging="MouseWheelInhibitor.mouseWheelChangingHandler(event)" />
> --- AS
> -
> package za.co.briteblue.twentytwoseven.presentation.components
> {
> import mx.events.FlexMouseEvent;
>  import spark.components.VScrollBar;
>
> public class MouseWheelInhibitor
>  {
> public static function mouseWheelChangingHandler(event:FlexMouseEvent):void
>  {
> // don't scroll by preventing default
> event.preventDefault();
>  // est amount to scroll based on height of viewport.
> var delta:Number = VScrollBar(event.target).viewport.height / 20;
>  if(event.delta < 0)
> VScrollBar(event.target).viewport.verticalScrollPosition += delta;
>  else
> VScrollBar(event.target).viewport.verticalScrollPosition -= delta;
>  }
> }
> }
>
> --- other solution extending the
> vscrollbar class -
>
> package za.co.briteblue.twentytwoseven.presentation.components
> {
> import flash.events.Event;
> import flash.events.MouseEvent;
>  import mx.core.IInvalidating;
> import mx.core.mx_internal;
>  import mx.events.FlexMouseEvent;
>  import spark.components.VScrollBar;
>  import spark.core.IViewport;
> import spark.core.NavigationUnit;
> import spark.utils.MouseEventUtil;
>  use namespace mx_internal;
>  public class TTSVScrollBar extends VScrollBar
> {
> public function TTSVScrollBar()
>  {
> super();
> }
>  // @author: braam
> // overridden to prevent viewport forced validation with every vertical
> scroll position update.
>  // when viewport is a datagrid, performance is terrible for mouse wheel
> scrolling.
> override mx_internal function mouseWheelHandler(event:MouseEvent):void
>  {
> const vp:IViewport = viewport;
> if (event.isDefaultPrevented() || !vp || !vp.visible || !visible)
>  return;
>  // Dispatch the "mouseWheelChanging" event. If preventDefault() is called
>  // on this event, the event will be cancelled.  Otherwise if  the delta
> // is modified the new value will be used.
>  var changingEvent:FlexMouseEvent =
> MouseEventUtil.createMouseWheelChangingEvent(event);
> if (!dispatchEvent(changingEvent))
>  {
> event.preventDefault();
> return;
>  }
>  const delta:int = changingEvent.delta;
>  var nSteps:uint = Math.abs(delta);
> var navigationUnit:uint;
>  var scrollPositionChanged:Boolean;
>  // Scroll delta "steps".
>  navigationUnit = (delta < 0) ? NavigationUnit.DOWN : NavigationUnit.UP;
> for (var vStep:int = 0; vStep < nSteps; vStep++)
>  {
> var vspDelta:Number = vp.getVerticalScrollPositionDelta(navigationUnit);
>  if (!isNaN(vspDelta))
> {
> vp.verticalScrollPosition += vspDelta;
>  scrollPositionChanged = true;
> // if (vp is IInvalidating)
> // IInvalidating(vp).validateNow();
>  }
> }
>  if (scrollPositionChanged)
> dispatchEvent(new Event(Event.CHANGE));
>  event.preventDefault();
> }
> }
> }
>
>  =
>
>  
>


[flexcoders] different handling of mouseWheelEvents in internet explorer and firefox/Chrome

2012-02-09 Thread Wouter Schreuders
Hi All

I've been having problems with the amount of scrolling that happens when
you use the mouse-wheel with VScrollBar. I came up with two possible
solutions(well actually my co-worked came up with the one and I came up
with the other), one is to prevent the default behaviour of the
mouseWheelChanging event. The other was to extend the vScrollbar class and
overwrite some functionality inside it. Both implementations are below. The
problem is that while both of these solutions work inside of firefox and
chrome, they don't seem to work in IE9, I'm guessing that IE9 is somehow
sending mouse-wheel events differently to the way it's done with the
flashplayer in the other browsers.

Has anyone encountered this before and know of a workaround?

Thanks

Wouter

like so:

---MXML-

--- AS
-
package za.co.briteblue.twentytwoseven.presentation.components
{
import mx.events.FlexMouseEvent;
 import spark.components.VScrollBar;

public class MouseWheelInhibitor
 {
public static function mouseWheelChangingHandler(event:FlexMouseEvent):void
 {
// don't scroll by preventing default
event.preventDefault();
 // est amount to scroll based on height of viewport.
var delta:Number = VScrollBar(event.target).viewport.height / 20;
 if(event.delta < 0)
VScrollBar(event.target).viewport.verticalScrollPosition += delta;
 else
VScrollBar(event.target).viewport.verticalScrollPosition -= delta;
 }
}
}

--- other solution extending the vscrollbar
class -

package za.co.briteblue.twentytwoseven.presentation.components
{
import flash.events.Event;
import flash.events.MouseEvent;
 import mx.core.IInvalidating;
import mx.core.mx_internal;
 import mx.events.FlexMouseEvent;
 import spark.components.VScrollBar;
 import spark.core.IViewport;
import spark.core.NavigationUnit;
import spark.utils.MouseEventUtil;
 use namespace mx_internal;
 public class TTSVScrollBar extends VScrollBar
{
public function TTSVScrollBar()
 {
super();
}
 // @author: braam
// overridden to prevent viewport forced validation with every vertical
scroll position update.
 // when viewport is a datagrid, performance is terrible for mouse wheel
scrolling.
override mx_internal function mouseWheelHandler(event:MouseEvent):void
 {
const vp:IViewport = viewport;
if (event.isDefaultPrevented() || !vp || !vp.visible || !visible)
 return;
 // Dispatch the "mouseWheelChanging" event. If preventDefault() is called
 // on this event, the event will be cancelled.  Otherwise if  the delta
// is modified the new value will be used.
 var changingEvent:FlexMouseEvent =
MouseEventUtil.createMouseWheelChangingEvent(event);
if (!dispatchEvent(changingEvent))
 {
event.preventDefault();
return;
 }
 const delta:int = changingEvent.delta;
 var nSteps:uint = Math.abs(delta);
var navigationUnit:uint;
 var scrollPositionChanged:Boolean;
 // Scroll delta "steps".
 navigationUnit = (delta < 0) ? NavigationUnit.DOWN : NavigationUnit.UP;
for (var vStep:int = 0; vStep < nSteps; vStep++)
 {
var vspDelta:Number = vp.getVerticalScrollPositionDelta(navigationUnit);
 if (!isNaN(vspDelta))
{
vp.verticalScrollPosition += vspDelta;
 scrollPositionChanged = true;
// if (vp is IInvalidating)
// IInvalidating(vp).validateNow();
 }
}
 if (scrollPositionChanged)
dispatchEvent(new Event(Event.CHANGE));
 event.preventDefault();
}
}
}


Re: [flexcoders] external debugger

2012-02-09 Thread Wouter Schreuders
well the kind of functionality I'm looking for is really for the back end
programmers, occasionally they need to dip into the flex side of things and
they have a lot of difficulty figuring out which class they need to work
on(for instance you have your application, then a module, then a component
which contains an itemrenderer which contains another itemrenderer and on
of those has some custom component inside).

If they can just hover their mouse over that element and it tells them what
class it is it would help them alot.

On 9 February 2012 07:17, Alex Harui  wrote:

> **
>
>
> FDB comes with the SDK.  It is command-line, but I use it 99% of the time
> as it is way faster than the GUI debugger in FlashBuilder for most problems
> I have to solve.
>
>
>
> On 2/7/12 11:06 PM, "Wouter Schreuders"  wrote:
>
>
>
>
>
>
> Hi All
>
> Can anyone recommend a debugger for flex that allows you to inspect and
> changed properties at runtime? Something like Flex-Spy or x-ray(for as2),
> but I'm looking for something that is not obsolete.
>
> Any recommendations?
>
> Thanks
>
> Wouter
>
>
>
>
>
> --
> Alex Harui
> Flex SDK Team
> Adobe Systems, Inc.
> http://blogs.adobe.com/aharui
>
>  
>


[flexcoders] external debugger

2012-02-08 Thread Wouter Schreuders
Hi All

Can anyone recommend a debugger for flex that allows you to inspect and
changed properties at runtime? Something like Flex-Spy or x-ray(for as2),
but I'm looking for something that is not obsolete.

Any recommendations?

Thanks

Wouter


Re: [flexcoders] spark scrollbar skinning

2012-02-06 Thread Wouter Schreuders
in Flash Build create a new skin, specify the host component as HScrollBar
and FB will generate a generic HScrollBar skin for you, inside of that skin
are a couple of buttons which make up the skin. Repeat this procedure for
those buttons and you'll have your skin.

On 2 February 2012 23:03, method_air  wrote:

> **
>
>
> I'm attempting to skin a spark scrollbar like this example:
>
>
> http://blog.flexexamples.com/2009/11/04/setting-a-custom-horizontal-scroll-bar-skin-on-a-spark-list-control-in-flex-4/
>
> ...but the scrollbar skinning is not applied. The disclaimer on the above
> link says,
>
> 'This entry is based on a beta version of the Flex 4 SDK and therefore is
> very likely to change as development of the Flex SDK continues.'
>
> I'm using flex sdk 4.5.1. How do I get the skinning working?
>
> Thanks,
>
> Philip
>
>  
>


Re: [flexcoders] spark DataGrid

2012-02-02 Thread Wouter Schreuders
Thanks, I actually decided to just rebuild the entire thing using spark
lists. DataGrid seems very problematic.

On 2 February 2012 10:19, Tandon, Rishi  wrote:

> **
>
>
> http://stackoverflow.com/questions/5900231/flex-4-5-hero-sdatagrid-rowcount
>
>
>   ------
> *From:* Wouter Schreuders 
> *To:* flexcoders@yahoogroups.com
> *Sent:* Wednesday, February 1, 2012 6:05 PM
> *Subject:* [flexcoders] spark DataGrid
>
>
> Hi All
>
> Does anyone know how I can get the actual number of visible rows for a
> spark datagrid similar to the mx datagrid which had the handy feature
> rowCount.
>
> Basically I want my last itemrenderer to do something different if it's
> the last itemrenderer. I thought I had this licked with the code:
>
> if(rowIndex == dataProvider.length)
>
> since I don't have a scrollbar and display all itemrenderers at once in
> the datagrid I thought that the dataprovider's length and the total number
> of rows would work, but this is not the case, sometimes there are 1 or 2
> more itemrenderers than displayed?
>
>
>
>   
>


[flexcoders] spark DataGrid

2012-02-01 Thread Wouter Schreuders
Hi All

Does anyone know how I can get the actual number of visible rows for a
spark datagrid similar to the mx datagrid which had the handy feature
rowCount.

Basically I want my last itemrenderer to do something different if it's the
last itemrenderer. I thought I had this licked with the code:

if(rowIndex == dataProvider.length)

since I don't have a scrollbar and display all itemrenderers at once in the
datagrid I thought that the dataprovider's length and the total number of
rows would work, but this is not the case, sometimes there are 1 or 2 more
itemrenderers than displayed?


Re: [flexcoders] explicitly setting tabbing order on an itemrenderer in a datagrid

2012-01-28 Thread Wouter Schreuders
Spark

Sent from my iPad

On 28 Jan 2012, at 8:51 AM, Alex Harui  wrote:

> Mx or spark DG?
> 
>  
> 
> Alex Harui
> 
> Flex SDK Developer
> 
> Adobe Systems Inc.
> 
> Blog: http://blogs.adobe.com/aharui
> 
>  
> 
> From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On 
> Behalf Of Wouter Schreuders
> Sent: Friday, January 27, 2012 1:42 AM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] explicitly setting tabbing order on an itemrenderer in 
> a datagrid
> 
>  
> 
>  
> 
> Hi All
> 
>  
> 
> I've got two datagrids using the same itemrenderer class with two different 
> dataproviders, When they are initially rendered the tabbing order works 
> perfectly. 
> 
>  
> 
> However I've built in some functionality that if you insert a value into a 
> textinput inside the itemrenderer it dispatches an event which updates the 
> datamodels for the two dataproviders which can result in the "transfer" of 
> one itemrenderer to another. That isn't really what's happening of course, 
> just that the dataproviders for the two datagrids get updated and then they 
> rerender to reflect that.
> 
>  
> 
> The problem is that when I update the dataprovider it seems to mess up my 
> tabbing order. On the datagrid from which I'm removing an item the tab order 
> gets reversed. From the datagrid to which an item is added the tabbing order 
> is seemingly random.
> 
>  
> 
> Is there a way in which I can explicitly set the tabbing order or 
> itemrenderer each time the data changes?
> 
>  
> 
> Thanks
> 
>  
> 
> Wouter
> 
> 
> 


Re: [flexcoders] explicitly setting tabbing order on an itemrenderer in a datagrid

2012-01-28 Thread Wouter Schreuders
Spark

Sent from my iPad

On 28 Jan 2012, at 8:51 AM, Alex Harui  wrote:

> Mx or spark DG?
> 
>  
> 
> Alex Harui
> 
> Flex SDK Developer
> 
> Adobe Systems Inc.
> 
> Blog: http://blogs.adobe.com/aharui
> 
>  
> 
> From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On 
> Behalf Of Wouter Schreuders
> Sent: Friday, January 27, 2012 1:42 AM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] explicitly setting tabbing order on an itemrenderer in 
> a datagrid
> 
>  
> 
>  
> 
> Hi All
> 
>  
> 
> I've got two datagrids using the same itemrenderer class with two different 
> dataproviders, When they are initially rendered the tabbing order works 
> perfectly. 
> 
>  
> 
> However I've built in some functionality that if you insert a value into a 
> textinput inside the itemrenderer it dispatches an event which updates the 
> datamodels for the two dataproviders which can result in the "transfer" of 
> one itemrenderer to another. That isn't really what's happening of course, 
> just that the dataproviders for the two datagrids get updated and then they 
> rerender to reflect that.
> 
>  
> 
> The problem is that when I update the dataprovider it seems to mess up my 
> tabbing order. On the datagrid from which I'm removing an item the tab order 
> gets reversed. From the datagrid to which an item is added the tabbing order 
> is seemingly random.
> 
>  
> 
> Is there a way in which I can explicitly set the tabbing order or 
> itemrenderer each time the data changes?
> 
>  
> 
> Thanks
> 
>  
> 
> Wouter
> 
> 
> 


[flexcoders] explicitly setting tabbing order on an itemrenderer in a datagrid

2012-01-27 Thread Wouter Schreuders
Hi All

I've got two datagrids using the same itemrenderer class with two different
dataproviders, When they are initially rendered the tabbing order works
perfectly.

However I've built in some functionality that if you insert a value into a
textinput inside the itemrenderer it dispatches an event which updates the
datamodels for the two dataproviders which can result in the "transfer" of
one itemrenderer to another. That isn't really what's happening of course,
just that the dataproviders for the two datagrids get updated and then they
rerender to reflect that.

The problem is that when I update the dataprovider it seems to mess up my
tabbing order. On the datagrid from which I'm removing an item the tab
order gets reversed. From the datagrid to which an item is added the
tabbing order is seemingly random.

Is there a way in which I can explicitly set the tabbing order or
itemrenderer each time the data changes?

Thanks

Wouter


[flexcoders] access focusColor inside of custom focus skin

2011-12-15 Thread Wouter Schreuders
Hi All.

I'm trying to create a custom focus skin for a textinput I have. However
I'd like the color of the skin to be dynamically assigned at runtime.

What I thought of doing is assigning the focusColor to a binding variable.
However I don't know how to access the focusColour property from within my
custom skin since my custom skin targets skinnable component and not
textInput.

Anyone have any ideas how to approach this?

Thanks

Wouter


[flexcoders] prevent flash builder from opening interfaces

2011-12-12 Thread Wouter Schreuders
Hi Guys/Gals

When I ctrl-click on a robotlegs injected class that implements an
interface like so:

- context file -
injector.mapSingletonOf(ITransactionService, TransactionService);
- context file -


- some mediator -
[Inject]
 public var transactionService:ITransactionService;
- some mediator -


It opens the interface which I guess makes sense but isn't really very
useful to me. Is there a way to configure flashbuilder the automatically
open the actual class?

Thanks

Wouter


Re: [flexcoders] Re: code out of sync with flash builder

2011-11-09 Thread Wouter Schreuders
well I am running windows 7, but I sure as hell am not going back to XP :D

Did you have to go through this process every time you debug? or only when
encountering the problem and then it would solve it for a while?

On 8 November 2011 16:40, Hans Goeckel  wrote:

> **
>
>
> **
> I've had a similar problem.  Flash Builder shows me the current source
> when debugging, but when you try to step through it, it is obviously
> running a previous version of the source.  What fixed it for me is to
> switch to another project in the workspace, compile it, then return to the
> main project, and recompile the modules that were screwing up.  Hope that
> fixes it for you too.
>
> Interestingly this problem seems to only occur on my new Windows 7 system
> with the latest Java.  My older XP system would crash when running out of
> Java heap space, but would never go out of sync.
>
>  
>


Re: [flexcoders] Re: code out of sync with flash builder

2011-11-08 Thread Wouter Schreuders
Yeah... I'm aware of that setting. under
window>preferences>run/debug>launching>Continue launch if project contains
errors.

I've set that to prompt but it's not the cause of the problem.

I see there's another setting "Luanch operation" mine is set to "launch the
selected resource or active editor. If not launchable: launch the
associated project"
instead of "launch the previously launched application"

What is yours set to?

On 8 November 2011 16:28, valdhor  wrote:

> **
>
>
> Do you have the debug even if there are errors (Or whatever it is called)
> turned on?
>
> I have only seen this when there are errors in the code so a compile can't
> complete. In this case Flex will let you debug but use the previous
> compiled version.
>
>
> --- In flexcoders@yahoogroups.com, Wouter Schreuders 
> wrote:
> >
> > Has anyone at least run into this problem before? I've had it on three
> > different machines.
> >
> > On 3 November 2011 10:29, Wouter Schreuders  wrote:
> >
> > > Hi All
> > >
> > > I'm continually running into this problem. When I debug my code flash
> > > builder intermittently show's me the previous build. It's super
> frustrating
> > > because you make a complex logic change to your code and then it
> doesn't
> > > work and you never know if it's that the code is wrong or flash builder
> > > just screwed up and is showing you the previous version.
> > >
> > > Anyone else run into this and know of some concrete steps I can take to
> > > prevent it from happening? A friend of mine runs FDT and says he's also
> > > encountered it so I'm guessing it's an eclipse problem.
> > >
> > > Any help would be appreciated
> > >
> > > thanks
> > >
> > > Wouter
> > >
> > >
> > >
> >
>
>  
>


[flexcoders] Re: code out of sync with flash builder

2011-11-07 Thread Wouter Schreuders
Has anyone at least run into this problem before? I've had it on three
different machines.

On 3 November 2011 10:29, Wouter Schreuders  wrote:

> Hi All
>
> I'm continually running into this problem. When I debug my code flash
> builder intermittently show's me the previous build. It's super frustrating
> because you make a complex logic change to your code and then it doesn't
> work and you never know if it's that the code is wrong or flash builder
> just screwed up and is showing you the previous version.
>
> Anyone else run into this and know of some concrete steps I can take to
> prevent it from happening? A friend of mine runs FDT and says he's also
> encountered it so I'm guessing it's an eclipse problem.
>
> Any help would be appreciated
>
> thanks
>
> Wouter
>
>
>


[flexcoders] code out of sync with flash builder

2011-11-03 Thread Wouter Schreuders
Hi All

I'm continually running into this problem. When I debug my code flash
builder intermittently show's me the previous build. It's super frustrating
because you make a complex logic change to your code and then it doesn't
work and you never know if it's that the code is wrong or flash builder
just screwed up and is showing you the previous version.

Anyone else run into this and know of some concrete steps I can take to
prevent it from happening? A friend of mine runs FDT and says he's also
encountered it so I'm guessing it's an eclipse problem.

Any help would be appreciated

thanks

Wouter


Re: [flexcoders] Re: exclude certain classes from debugging session

2011-09-29 Thread Wouter Schreuders
ok great tip, I'll try that

On 29 September 2011 00:00, Alex Harui  wrote:

> **
>
>
> Put those classes you don’t want to debug in an RSL, export it for release
> so it doesn’t have debug info, and use that RSL.  The debugger should then
> skip over the code in those classes.
>
> I’ve never done it myself, but I know for sure that if classes get loaded
> in a module that is exported for release, I can’t debug into those classes.
>
>
>
> On 9/28/11 1:34 PM, "Wouter Schreuders"  wrote:
>
>
>
>
>
>
> ok well basically say I'm trying to track the flow a certain command is
> taking, so for instance someone clicks a button in a view class, that
> dispatches an event to the view's mediator which then dispatches another
> event to robotlegs which then triggers a navigation event along with some
> requests to get data,etc , in this instance some of the navigation
> animations are being handled by tweener which is using an enterframe event
> to do it's animation. So if I hit F6 I keep getting pulled into tweeners'
> class like 60 times because it's using an onEnterframe, and then you could
> have some component that has a lot of invalidate calls as it renders itself.
> So basically I'd like to be able to say, hey I know all these classes are
> doing things but I don't care about them I want to skip over them
> automatically when I hit step over.
>
>
>
> On 28 September 2011 22:25, valdhor  wrote:
>
>
>
>
>
>
> I'm obviously not getting it then.
>
> My project uses thousands of classes and I can debug it and just look at
> the classes I want.
>
> What are you trying to do exactly? ie. What does "monitor the activity
> taking place in a couple of the classes" actually mean?
>
>
>
> --- In flexcoders@yahoogroups.com 
> <mailto:flexcoders%40yahoogroups.com>
> , Wouter Schreuders  wrote:
> >
> > yes, I'm familiar with watch expressions but they don't really help me
> with
> > this project, I'm working on a project with thousands of classes and want
> to
> > monitor the activity taking place in a couple of the classes while
> excluding
> > the rest.
> >
> > On 26 September 2011 16:59, valdhor  wrote:
> >
> > > **
> > >
> > >
> > > Just use watch expressions to see only the items you are interested in.
> > >
> > >
> > > --- In flexcoders@yahoogroups.com 
> > > <mailto:flexcoders%40yahoogroups.com>
> , Wouter Schreuders 
>
> > > wrote:
> > > >
> > > > Hi All
> > > >
> > > > When debugging some code and stepping through or stepping over some
> code,
> > > is
> > > > it possible to configure flex to not include certain classes in the
> > > > debugging session or at least to entirely skip those classes from
> begin
> > > > included in the debugging session(but they still need to execute,
> just
> > > don't
> > > > want to see it)
> > > >
> > > > The reason for this is that sometimes I'm stepping though some code
> and
> > > > there are certain classes just dont' want to know about (for instance
> > > > tweening classes or robotlegs)
> > > >
> > > > Anyone know if this is possible?
> > > >
> > > > Thanks
> > > >
> > > > Wouter
> > > >
> > >
> > >
> > >
> >
>
>
>
>
>
>
>
>
>
>
>
>
> --
> Alex Harui
> Flex SDK Team
> Adobe System, Inc.
> http://blogs.adobe.com/aharui
>
>  
>


Re: [flexcoders] Re: exclude certain classes from debugging session

2011-09-28 Thread Wouter Schreuders
ok well basically say I'm trying to track the flow a certain command is
taking, so for instance someone clicks a button in a view class, that
dispatches an event to the view's mediator which then dispatches another
event to robotlegs which then triggers a navigation event along with some
requests to get data,etc , in this instance some of the navigation
animations are being handled by tweener which is using an enterframe event
to do it's animation. So if I hit F6 I keep getting pulled into tweeners'
class like 60 times because it's using an onEnterframe, and then you could
have some component that has a lot of invalidate calls as it renders itself.
So basically I'd like to be able to say, hey I know all these classes are
doing things but I don't care about them I want to skip over them
automatically when I hit step over.



On 28 September 2011 22:25, valdhor  wrote:

> **
>
>
> I'm obviously not getting it then.
>
> My project uses thousands of classes and I can debug it and just look at
> the classes I want.
>
> What are you trying to do exactly? ie. What does "monitor the activity
> taking place in a couple of the classes" actually mean?
>
>
> --- In flexcoders@yahoogroups.com, Wouter Schreuders 
> wrote:
> >
> > yes, I'm familiar with watch expressions but they don't really help me
> with
> > this project, I'm working on a project with thousands of classes and want
> to
> > monitor the activity taking place in a couple of the classes while
> excluding
> > the rest.
> >
> > On 26 September 2011 16:59, valdhor  wrote:
> >
> > > **
> > >
> > >
> > > Just use watch expressions to see only the items you are interested in.
> > >
> > >
> > > --- In flexcoders@yahoogroups.com, Wouter Schreuders 
> > > wrote:
> > > >
> > > > Hi All
> > > >
> > > > When debugging some code and stepping through or stepping over some
> code,
> > > is
> > > > it possible to configure flex to not include certain classes in the
> > > > debugging session or at least to entirely skip those classes from
> begin
> > > > included in the debugging session(but they still need to execute,
> just
> > > don't
> > > > want to see it)
> > > >
> > > > The reason for this is that sometimes I'm stepping though some code
> and
> > > > there are certain classes just dont' want to know about (for instance
> > > > tweening classes or robotlegs)
> > > >
> > > > Anyone know if this is possible?
> > > >
> > > > Thanks
> > > >
> > > > Wouter
> > > >
> > >
> > >
> > >
> >
>
>  
>


Re: [flexcoders] Re: exclude certain classes from debugging session

2011-09-27 Thread Wouter Schreuders
yes, I'm familiar with watch expressions but they don't really help me with
this project, I'm working on a project with thousands of classes and want to
monitor the activity taking place in a couple of the classes while excluding
the rest.

On 26 September 2011 16:59, valdhor  wrote:

> **
>
>
> Just use watch expressions to see only the items you are interested in.
>
>
> --- In flexcoders@yahoogroups.com, Wouter Schreuders 
> wrote:
> >
> > Hi All
> >
> > When debugging some code and stepping through or stepping over some code,
> is
> > it possible to configure flex to not include certain classes in the
> > debugging session or at least to entirely skip those classes from begin
> > included in the debugging session(but they still need to execute, just
> don't
> > want to see it)
> >
> > The reason for this is that sometimes I'm stepping though some code and
> > there are certain classes just dont' want to know about (for instance
> > tweening classes or robotlegs)
> >
> > Anyone know if this is possible?
> >
> > Thanks
> >
> > Wouter
> >
>
>  
>


[flexcoders] exclude certain classes from debugging session

2011-09-23 Thread Wouter Schreuders
Hi All

When debugging some code and stepping through or stepping over some code, is
it possible to configure flex to not include certain classes in the
debugging session or at least to entirely skip those classes from begin
included in the debugging session(but they still need to execute, just don't
want to see it)

The reason for this is that sometimes I'm stepping though some code and
there are certain classes just dont' want to know about (for instance
tweening classes or robotlegs)

Anyone know if this is possible?

Thanks

Wouter


[flexcoders] state behaviours not working after overriding state styles

2011-08-26 Thread Wouter Schreuders
Hi All

I've run into a small problem I was wondering it any of you have run into.

I'm overriding some state style in my mxml document depending on when what
kind of data I'm receiving. here's the function:

protected function decideColour(event:FlexEvent, money:Money):void
{
 if(money.debitOrCredit == "credit")
{
 // do nothing
} else
 {
 // just setting it with normal setstlyle also because otherwise doesn't
redraw the itemrenderer and none of the invalidate functions seem to work
 event.target.setStyle("color", colours.debtColour);
 setStyleForState(event.target, "color", "normal", colours.debtColour);
 setStyleForState(event.target, "color", "hovered",
colours.debtHoverColour);
 setStyleForState(event.target, "color", "selected",
colours.debtSelectedColour);
 }
}

private function setStyleForState(object:Object, style:String, state:String,
value:Object):void {
 var editedState:State;
for each(var s:State in this.states) {
 if(s.name == state) {
editedState = s;
 break;
}
 }
editedState.overrides = [ new SetStyle( object as IStyleClient, style,
value) ];
 }
This works fun but the problem is that as soon as I do this none of my other
state related events trigger anymore. For instance I have this code here
which works fine before I use the setStyleForState fucntion.


 

 

 

 

I've managed to work around it manually by firing the stateChangeComplete
event and then making two seperate rectangles visible/invisible but it would
still be interesting to know why this is happening.

Anyone run into this before?


[flexcoders] consistent dynamic layout

2011-08-23 Thread Wouter Schreuders
Hi All

I've got a minor problem with doing an itemrenderer layout.

I've got an itemrenderer which renders master categories, each of these
master categories then renders a list. My problem comes in with the list and
more specifically it's titles, I'd like to to be dynamic in the sense that
I'd like the items in the list to take up the entire width of the browser.
In order for the layout to be dynamic I'm using the width percentage of the
containing movieclip to set the positioning (width = "{this.width * .2}")

The problem is that even though the list and it's parent movieclip are the
same size they don't seem to be getting the same value. And therefore my
list items aren't lining up with their title.

Each list has a bunch of titles/descriptors for each item in the list then
the actual item renderer, like this:


 
 

 

 

 
 
 

 
 

 


inside the code for the list item:


 
 

 


does anyone have an suggestion on how I can achieve this layout?

thanks

Syllogism