[flexcoders] Cairngorm Event Question

2012-09-21 Thread Davidson, Jerry
Where can I ask a Cairngorm/Flex Event Question?  I posted in the Adobe forum, 
but as usual have not received any replies.

The question is how to get something to happen.  When the user clicks an item 
renderer in one grid I want to populate a second grid with data.

Here are the relevant parts=
UserAA_NmLk_Renderer.mxml:
  public static const CLICK:String = 'USER_AA_RETRIEVE_EVENT';

  override public function set data(value:Object):void
  {
removeAllChildren();

if (value == null ||
  value == )
{
  return;
}

super.data = value;

var lb2:LinkButton = new LinkButton();

lb2.label = value.individualName +
  :  + value.rspVer;

lb2.addEventListener(MouseEvent.CLICK, retrieveList);
addChild(lb2);
  }

  public function retrieveList(event:Event):void
  {
dispatchEvent(new Event(UserAA_NmLk_Renderer.CLICK, true, false));
  }

Event.as:
  public static const USER_AA_RETRIEVE_EVENT:String = UserAARetrieveEvent;

Controller.as:
  addCommand( Events.USER_AA_RETRIEVE_EVENT, UserAARetrieveCommand );

When I step through it I get to the dispatch and the proper label appears in 
the top grid.  But I never get to UserAARetrieveCommand.

I am getting very desperate on this and have been fighting it for days.

Any help including the problem or where to go with the problem will be greatly 
appreciated!

Jerry


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 aha...@adobe.com 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 wschreud...@gmail.com 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 aha...@adobe.com wrote:

 stage.focus







 --
 Alex Harui
 Flex SDK Team
 Adobe Systems, Inc.
 http://blogs.adobe.com/aharui

  



[flexcoders] RE: Cairngorm Event Question

2012-09-21 Thread Davidson, Jerry
I think I found the solutions.  As always, it brings up a new question.

The problem was I was trying to follow the pattern of prior code and I decided 
to dump that and go with the same kind of code that populated the first grid.

If anyone is interested, I'd be happy to copy some code here to share.

Jerry

From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf 
Of Davidson, Jerry
Sent: Friday, September 21, 2012 8:46 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Cairngorm Event Question


Where can I ask a Cairngorm/Flex Event Question?  I posted in the Adobe forum, 
but as usual have not received any replies.

The question is how to get something to happen.  When the user clicks an item 
renderer in one grid I want to populate a second grid with data.

Here are the relevant parts=
UserAA_NmLk_Renderer.mxml:
  public static const CLICK:String = 'USER_AA_RETRIEVE_EVENT';

  override public function set data(value:Object):void
  {
removeAllChildren();

if (value == null ||
  value == )
{
  return;
}

super.data = value;

var lb2:LinkButton = new LinkButton();

lb2.label = value.individualName +
  :  + value.rspVer;

lb2.addEventListener(MouseEvent.CLICK, retrieveList);
addChild(lb2);
  }

  public function retrieveList(event:Event):void
  {
dispatchEvent(new Event(UserAA_NmLk_Renderer.CLICK, true, false));
  }

Event.as:
  public static const USER_AA_RETRIEVE_EVENT:String = UserAARetrieveEvent;

Controller.as:
  addCommand( Events.USER_AA_RETRIEVE_EVENT, UserAARetrieveCommand );

When I step through it I get to the dispatch and the proper label appears in 
the top grid.  But I never get to UserAARetrieveCommand.

I am getting very desperate on this and have been fighting it for days.

Any help including the problem or where to go with the problem will be greatly 
appreciated!

Jerry



[flexcoders] Passing Data

2012-09-21 Thread Davidson, Jerry
I have an item renderer that is a linkbutton.  It is in an advancedatagrid of a 
few columns.  When it is clicked, a procedure is fired up and that procedure 
needs to know the values of the datasource for that row.  How do I communicate 
that?

Here is the renderer:

override public function set data(value:Object):void
{
  removeAllChildren();

  if (value == null ||
value == )
  {
return;
  }

  super.data = value;

  var lb2:LinkButton = new LinkButton();

  lb2.label = value.individualName +
:  + value.rspVer;

  lb2.addEventListener(MouseEvent.CLICK, retrieveList);
  addChild(lb2);
}

public function retrieveList(event:Event):void
{
  var retrieve:UserAARetrieveVO = new UserAARetrieveVO();
  retrieve.type = Const.USER_AA_RETRIEVE;
  retrieve.indvID = // selected row of datasource id;
  retrieve.parmStartDate =  // selected row of datasource start;
  retrieve.parmEndDate =// selected row of datasource end;

  (new UserAARetrieveEvent(retrieve)).dispatch();
}


TIA,
Jerry



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

2012-09-21 Thread Alex Harui
If you turn off accessibility in the MXML app does displayAsPassword still make 
a difference?  I’m not really sure how to help here, just throwing out ideas.


On 9/21/12 3:11 AM, Wouter Schreuders wschreud...@gmail.com wrote:






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 aha...@adobe.com 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 wschreud...@gmail.com 
http://wschreud...@gmail.com  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 aha...@adobe.com 
http://aha...@adobe.com  wrote:
stage.focus






--
Alex Harui
Flex SDK Team
Adobe Systems, Inc.
http://blogs.adobe.com/aharui