[flexcoders] Sorting an XMLList on an attribute

2008-07-29 Thread gaurav1146
Hi,
 I am trying to sort an XMLList based on one of the attributes in the
XML node. On trying this I get the following error:

TypeError: Error #1089: Assignment to lists with more than one item is
not supported.

Instead of XMLList if I use XMLListCollection it works fine. The thing
is that I have used XMLList at lot of other places in my code as well
so I cannot easily switch to XMListCollection. I would be prefer a way
if I could sort the XMLList somwehow.

Following is the sample code that I tried for the sorting difference
between XMLList amd XMLListCollection:


http://www.adobe.com/2006/mxml";
layout="absolute">












[flexcoders] Parsing MultiLevel Array

2008-07-29 Thread sudha_bsb
Hi,

I have a requirement wherin I have to parse a multilevel array. 
Suppose we have an array like

   
 
 
   
   
 
 

   
   



Now, this array is a dataprovider for a component that basically 
creates a list of buttons. When an array object has children the 
component creates the children as well. 
My question is how do I let the component know that a particular 
object of its dataprovider has children? And how do I let it know 
what those children are? 

I do not have the option to convert the array into XML or XMLList and 
then parse it..I have to let the array remain as it is

Thanks & Regards,
Sudha. 



[flexcoders] Re: Checking if an object exists

2008-07-29 Thread Rafael Faria
For instance

parentApplication.appData['moduleParams'].table_name


'moduleParams' is an object as well. it might not exist, and
table_name might not exist... i need to test if table_name exists...

anything i put it returns

Error: Error #1009: Cannot access a property or method of a null
object reference.
at...


i tried
if ((parentApplication.appData['moduleParams'] == null) ||
(!parentApplication.appData['moduleParams'].moduleFrom)) {
}

i tried

if ((!parentApplication.appData.hasOwnProperty('moduleParams')) ||
(!parentApplication.appData.hasOwnProperty('moduleParams').moduleFrom)) {
}

or

if ((!('moduleParams' in parentApplication.appData)) ||
(!('moduleFrom' in parentApplication.appData['moduleParams']))) {
}

same error...

anyone can help me how i would test if 

parentApplication.appData['moduleParams'].table_name
exists?


rafael




--- In flexcoders@yahoogroups.com, "Josh McDonald" <[EMAIL PROTECTED]> wrote:
>
> If it's an array, then you want:
> 
> if(archive[record_id].length > 1)
> {
> //do stuff
> }
> 
> -Josh
> 
> On Tue, Jul 29, 2008 at 2:05 PM, Rafael Faria
> <[EMAIL PROTECTED]>wrote:
> 
> > Hello all,
> >
> > I'm here for one of my questions again :P
> >
> > I need to make a  comparison  like this
> >
> > if (archive[record_id][1].deleted_id == deleted_id) {
> >
> > }
> > My problem is that [1].deleted_id might not exist at this point.
> >
> > I know that archive[record_id] exists so how can i make this
> > comparison above?
> >
> > [1] might not exists and i can't use hasOwnProperty("1") because it
> > throws an error as well.
> >
> > can someone help me?! :P
> >
> > raf
> >
> >
> >
> > 
> >
> > --
> > Flexcoders Mailing List
> > FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> > Search Archives:
> > http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups
> > Links
> >
> >
> >
> >
> 
> 
> -- 
> "Therefore, send not to know For whom the bell tolls. It tolls for
thee."
> 
> :: Josh 'G-Funk' McDonald
> :: 0437 221 380 :: [EMAIL PROTECTED]
>




Re: [flexcoders] Measurement and percentages (was measurement and template components)

2008-07-29 Thread Richard Rodseth
OK, thanks. Just in case, here are the base classes:

TiledCanvas < Container (100%)
..PodChrome < VBox (n of these)
ReportModuleA < VBox (100%) (not a real module, just a VBox)
..ReportChrome < Canvas (100%)
ReportA < VBox (100%, minimum 500)
..Grid

On Tue, Jul 29, 2008 at 10:30 PM, Alex Harui <[EMAIL PROTECTED]> wrote:
> In theory, if measure() returns different numbers than the last time it got
> called, invalidateDisplayList gets called and eventually you get
> updateDisplayList and go through layout again.
>
>
>
> Also, in theory, measuredMinWidth/measuredWidth (and heights) will be
> different if you have % on reportChrome or not which might yield a clue.  Or
> the updateDL gets called a different number of times.  I don't know what
> each of these levels have for base classes.  That might make a difference as
> well.
>
>
>
> If you build up a test case base on the base classes for these components,
> maybe that should be posted so we can take a closer look.  Otherwise it
> points to your custom code.
>
>
>
> -Alex
>
>
>
> 
>
> From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
> Behalf Of Richard Rodseth
> Sent: Tuesday, July 29, 2008 9:52 PM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Measurement and percentages (was measurement and
> template components)
>
>
>
> Alex requested that I start a new thread to review. Here's the
> relevant portion of the hierarchy (stated values are in both x and y
> directions):
>
> TiledCanvas (100%)
> ..PodChrome(n of these)
> ReportModuleA (100%) (not a real module, just a VBox)
> ..ReportChrome (100%)
> ReportA (100%, minimum 500)
> ..Grid
>
> PodChrome and ReportModuleA are created in ActionScript at runtime.
>
> TiledCanvas is supposed to have scrollbars. Tested in isolation (i.e.
> with a bunch of buttons as children, some with minimums set, it does.
> In the above hierarchy, If I remove the 100% from ReportChrome, it
> does. But with the percentage sizing of ReportChrome, it doesn't.
>
> It appears that all the measure() methods get called and return 500 or more.
> I noticed the following in Container.getScrollableRect(). Possibly related?
>
> // width/height can be NaN if using percentages and
> // hasn't been layed out yet.
> if (!isNaN(child.width))
> right = Math.max(right, child.x + child.width);
> if (!isNaN(child.height))
> bottom = Math.max(bottom, child.y + child.height);
>
> I also notice some code in UIComponent (I think) that was calling
> invalidateDisplayList() immediately after invalidateSize(). Do those
> need to be paired? Perhaps my code which constructs PodChrome and
> ReportModuleA needs to call invalidateDisplayList.
>
> 


[flexcoders] Re: skinning and validation

2008-07-29 Thread Tim Hoff
Hi Toby,

For drawing the error border, flex uses the Focus Manager.  If you 
use a focusSkin, it lloks like it over-rides the focus rectangle 
drawn with the errorColor.  Try taking that skin out, to see if it 
comes back.  Don't know about the comboBox.  Have you verified that 
the validation failure is actually setting the errorString?  You can 
try this; to find out if it's a skin or logic problem: 



-TH

--- In flexcoders@yahoogroups.com, Toby Tremayne <[EMAIL PROTECTED]> wrote:
>
> Hi all,
> 
>   I've googled but every time I find someone with the same 
problem the  
> questions seem to go unanswered...
> 
>   I have skins applied to a flex app and I'm having an issue 
where for  
> most elements the red border doesn't show up when validation 
fails.   
> For example, I have this in my css file:
> 
> TextInput
> {
>   borderSkin: Embed(source="TextInput.swf",  
> symbol="TextInput_borderSkin");
>   focusSkin: Embed(source="TextInput.swf", 
symbol="TextInput_focusSkin");
> }
> ComboBox
> {
>   disabledSkin: Embed(source="ComboBox.swf",  
> symbol="ComboBox_disabledSkin");
>   downSkin: Embed(source="ComboBox.swf", 
symbol="ComboBox_downSkin");
>   editableDisabledSkin: Embed(source="ComboBox.swf",  
> symbol="ComboBox_editableDisabledSkin");
>   editableDownSkin: Embed(source="ComboBox.swf",  
> symbol="ComboBox_editableDownSkin");
>   editableOverSkin: Embed(source="ComboBox.swf",  
> symbol="ComboBox_editableOverSkin");
>   editableUpSkin: Embed(source="ComboBox.swf",  
> symbol="ComboBox_editableUpSkin");
>   overSkin: Embed(source="ComboBox.swf", 
symbol="ComboBox_overSkin");
>   upSkin: Embed(source="ComboBox.swf", 
symbol="ComboBox_upSkin");
> }
> 
> And neither combobox nor textinput show the red validation border 
when  
> validation fails.  What am I missing?  Is there a way to specify 
an  
> error border skin or something?  Or should there be some way in 
the  
> skin file to add an error border?
> 
> cheers,
> Toby
> ---
> 
> Life is poetry, write it in your own words
> 
> ---
> 
> Toby Tremayne
> CEO
> Code Poet and Zen Master of the Heavy Sleep
> Lyricist Software
> 0416 048 090
> ICQ: 13107913
>




RE: [flexcoders] Measurement and percentages (was measurement and template components)

2008-07-29 Thread Alex Harui
In theory, if measure() returns different numbers than the last time it
got called, invalidateDisplayList gets called and eventually you get
updateDisplayList and go through layout again.

 

Also, in theory, measuredMinWidth/measuredWidth (and heights) will be
different if you have % on reportChrome or not which might yield a clue.
Or the updateDL gets called a different number of times.  I don't know
what each of these levels have for base classes.  That might make a
difference as well.

 

If you build up a test case base on the base classes for these
components, maybe that should be posted so we can take a closer look.
Otherwise it points to your custom code.

 

-Alex

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Richard Rodseth
Sent: Tuesday, July 29, 2008 9:52 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Measurement and percentages (was measurement and
template components)

 

Alex requested that I start a new thread to review. Here's the
relevant portion of the hierarchy (stated values are in both x and y
directions):

TiledCanvas (100%)
..PodChrome(n of these)
ReportModuleA (100%) (not a real module, just a VBox)
..ReportChrome (100%)
ReportA (100%, minimum 500)
..Grid

PodChrome and ReportModuleA are created in ActionScript at runtime.

TiledCanvas is supposed to have scrollbars. Tested in isolation (i.e.
with a bunch of buttons as children, some with minimums set, it does.
In the above hierarchy, If I remove the 100% from ReportChrome, it
does. But with the percentage sizing of ReportChrome, it doesn't.

It appears that all the measure() methods get called and return 500 or
more.
I noticed the following in Container.getScrollableRect(). Possibly
related?

// width/height can be NaN if using percentages and
// hasn't been layed out yet.
if (!isNaN(child.width))
right = Math.max(right, child.x + child.width);
if (!isNaN(child.height))
bottom = Math.max(bottom, child.y + child.height);

I also notice some code in UIComponent (I think) that was calling
invalidateDisplayList() immediately after invalidateSize(). Do those
need to be paired? Perhaps my code which constructs PodChrome and
ReportModuleA needs to call invalidateDisplayList.

 



[flexcoders] dynamic remote objects

2008-07-29 Thread Dan Vega
I have a remote object that is very dynamic.The user is actually selecting
the source of the component and the method name. So how can I refer to the
remote objects methods dynamically?

ro[methodname].addEventListenter() ???

var ro:RemoteObject = new RemoteObject();
ro.destination = "ColdFusion";
ro.source = something.text
ro.METHODNAME.addEventListener("result", getListResultHandler);
ro.addEventListener("fault", faultHandler);

ro..METHODNAME(deptComboBox.selectedItem.data);

Thank You
Dan Vega


[flexcoders] OAuth

2008-07-29 Thread meaglith
Hi guys:
I recently write a AIR application which must have authentication by
OAuth spec, but the open browser to auth will broken the user experience.
Have any smoothly solution without open another browser?

Thanks.

Meaglith


[flexcoders] skinning and validation

2008-07-29 Thread Toby Tremayne

Hi all,

	I've googled but every time I find someone with the same problem the  
questions seem to go unanswered...


	I have skins applied to a flex app and I'm having an issue where for  
most elements the red border doesn't show up when validation fails.   
For example, I have this in my css file:


TextInput
{
	borderSkin: Embed(source="TextInput.swf",  
symbol="TextInput_borderSkin");

focusSkin: Embed(source="TextInput.swf", symbol="TextInput_focusSkin");
}
ComboBox
{
	disabledSkin: Embed(source="ComboBox.swf",  
symbol="ComboBox_disabledSkin");

downSkin: Embed(source="ComboBox.swf", symbol="ComboBox_downSkin");
	editableDisabledSkin: Embed(source="ComboBox.swf",  
symbol="ComboBox_editableDisabledSkin");
	editableDownSkin: Embed(source="ComboBox.swf",  
symbol="ComboBox_editableDownSkin");
	editableOverSkin: Embed(source="ComboBox.swf",  
symbol="ComboBox_editableOverSkin");
	editableUpSkin: Embed(source="ComboBox.swf",  
symbol="ComboBox_editableUpSkin");

overSkin: Embed(source="ComboBox.swf", symbol="ComboBox_overSkin");
upSkin: Embed(source="ComboBox.swf", symbol="ComboBox_upSkin");
}

And neither combobox nor textinput show the red validation border when  
validation fails.  What am I missing?  Is there a way to specify an  
error border skin or something?  Or should there be some way in the  
skin file to add an error border?


cheers,
Toby
---

Life is poetry, write it in your own words

---

Toby Tremayne
CEO
Code Poet and Zen Master of the Heavy Sleep
Lyricist Software
0416 048 090
ICQ: 13107913



[flexcoders] Refreshing data in dataGrid

2008-07-29 Thread Joshua Jackson
Dear all,

I've got a list of data displayed in a datagrid where the DataProvider
is from Spring as the backend. Now everytime I add, update or delete
data, it doesn't refresh the datagrid. How do I do this in Flex?
I've tried doing 
- dataProvider.refresh();
- dataGrid.dataProvider.dispatchEvent(new
CollectionEvent(CollectionEvent.COLLECTION_CHANGE));

But none of them works. Is there a special treatment is the data
provider is from a database? Please give me some hints on this.

Many thanks



[flexcoders] Re: Custom Context Menu in flex app

2008-07-29 Thread kroghadam
I think the problem here is that you are using the same name for your
menu item as one of the built in menu items. These include
forwardAndBack, loop, play, print, quality, rewind, save and zoom. Set
the label of your menu items to anything but these and it should work.

-Adam

--- In flexcoders@yahoogroups.com, "Alex Harui" <[EMAIL PROTECTED]> wrote:
>
> Looks ok to me.  Make sure you're right clicking on the app and not
> something that has its own context menu
> 
>  
> 
> 
> 
> From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
> Behalf Of vipinck
> Sent: Tuesday, July 29, 2008 3:14 PM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Custom Context Menu in flex app
> 
>  
> 
> I am trying to add a custom context menu in my flex app. I am writing
> below code in a method which i am calling on applicationComplete event
> of the main application.
> 
> //
> customMenu = new ContextMenu();
> var saveItem:ContextMenuItem = new
> ContextMenuItem("Save",true,true,true);
> saveItem.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT,
> doSaveCommand);
> customMenu.hideBuiltInItems();
> customMenu.customItems.push(saveItem);
> Application.application.contextMenu = customMenu;
> 
> //
> 
> I am able to hide the default menu items when using the
> customMenu.hideBuiltInItems(); code, but the custom 'Save' item is not
> getting added.
> 
> What could be wrong?
> 
> Thnx
> Vipin
>




[flexcoders] Re: Custom Context Menu in flex app

2008-07-29 Thread kroghadam
I think the problem here is that you are using the same name for your
menu item as one of the built in menu items. These include
forwardAndBack, loop, play, print, quality, rewind, save and zoom. Set
the label of your menu item to anything but these and it should work.

-Adam

--- In flexcoders@yahoogroups.com, "Alex Harui" <[EMAIL PROTECTED]> wrote:
>
> Looks ok to me.  Make sure you're right clicking on the app and not
> something that has its own context menu
> 
>  
> 
> 
> 
> From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
> Behalf Of vipinck
> Sent: Tuesday, July 29, 2008 3:14 PM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Custom Context Menu in flex app
> 
>  
> 
> I am trying to add a custom context menu in my flex app. I am writing
> below code in a method which i am calling on applicationComplete event
> of the main application.
> 
> //
> customMenu = new ContextMenu();
> var saveItem:ContextMenuItem = new
> ContextMenuItem("Save",true,true,true);
> saveItem.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT,
> doSaveCommand);
> customMenu.hideBuiltInItems();
> customMenu.customItems.push(saveItem);
> Application.application.contextMenu = customMenu;
> 
> //
> 
> I am able to hide the default menu items when using the
> customMenu.hideBuiltInItems(); code, but the custom 'Save' item is not
> getting added.
> 
> What could be wrong?
> 
> Thnx
> Vipin
>




[flexcoders] Flash 9 localhost socket connection on Windows

2008-07-29 Thread Darren Cook
Stumped again. I've a php socket server, and a flash 9/AS3 swf app. And
I'm testing both on both linux and Windows. The swf is trusted (on both
linux and windows)(See this blog entry on trusting swfs.).

The problem is that the flash 9 swf on windows cannot properly connect
to the php socket server on windows. What is stumping me is that every
other combination works:
Flash 9 from win to linux server: OK
Flash 9 from linux to win server: OK
Flash 9 from linux to linux server (localhost): OK

I also have an old Flash 8/AS2 version of the app, on windows. It can
connect to windows localhost server okay. Telnet from either windows
(localhost) and linux can both connect to the windows server OK too.
In other words only the configuration required for production-use
(windows server with flash 9 on same windows machine) does not work.
Insert a really juicy swear word here.

What is the problem behaviour? In the flash client it says it has
connected properly. No other messages. On the server side it says
nothing; only when I kill the flash client do I get a bunch of log entries:
Client connected
Sending data
ERROR: failed socket_read from client so closing socket. Last socket
error: An established connection was aborted by the software in your
host machine.
Client disconnect: read failed

While flash is running netstat shows the connection as "ESTABLISHED".

Googling says it is the firewall or virus scanner in the way. I've now
switched off everything, and the problem remains. But I don't think it
could be that anyway, because connections from Flash 8 and telnet work.

It has to be something specific to Flash 9 on windows, when connecting
to a windows server (or when connecting to localhost).

Anyone else seen something like this? Thanks in advance!

Darren

P.S. This mysql bug report says pooling caused it:
http://bugs.mysql.com/bug.php?id=6634
But I'm not doing anything sophisticated like that.

-- 
Darren Cook, Software Researcher/Developer
http://dcook.org/mlsn/ (English-Japanese-German-Chinese-Arabic
open source dictionary/semantic network)
http://dcook.org/work/ (About me and my work)
http://darrendev.blogspot.com/ (blog on php, flash, i18n, linux, ...)


[flexcoders] Re: Custom Context Menu in flex app

2008-07-29 Thread kroghadam
I think the problem here is that you are using the same name for your
menu item as one of the built in menu items. These include
forwardAndBack, loop, play, print, quality, rewind, save and zoom.
Set the label of your menu item to anything but these and it should work.

-Adam

--- In flexcoders@yahoogroups.com, "vipinck" <[EMAIL PROTECTED]> wrote:
>
> I am trying to add a custom context menu in my flex app. I am writing
> below code in a method which i am calling on applicationComplete event
> of the main application.
> 
> //
> customMenu = new ContextMenu();
> var saveItem:ContextMenuItem = new
> ContextMenuItem("Save",true,true,true);
> saveItem.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT,
> doSaveCommand);
> customMenu.hideBuiltInItems();
> customMenu.customItems.push(saveItem);
> Application.application.contextMenu = customMenu;
> 
> //
> 
> I am able to hide the default menu items when using the
> customMenu.hideBuiltInItems(); code, but the custom 'Save' item is not
> getting added.
> 
> What could be wrong?
> 
> Thnx
> Vipin
>




[flexcoders] Measurement and percentages (was measurement and template components)

2008-07-29 Thread Richard Rodseth
Alex requested that I start a new thread to review. Here's the
relevant portion of the hierarchy  (stated values are in both x and y
directions):

TiledCanvas (100%)
..PodChrome(n of these)
ReportModuleA (100%) (not a real module, just a VBox)
..ReportChrome (100%)
ReportA (100%, minimum 500)
..Grid

PodChrome and ReportModuleA are created in ActionScript at runtime.

TiledCanvas is supposed to have scrollbars. Tested in isolation (i.e.
with a bunch of buttons as children, some with minimums set, it does.
In the above hierarchy, If I remove the 100% from ReportChrome, it
does. But with the percentage sizing of ReportChrome, it doesn't.

It appears that all the measure() methods get called and return 500 or more.
I noticed the following in Container.getScrollableRect(). Possibly related?

// width/height can be NaN if using percentages and
// hasn't been layed out yet.
if (!isNaN(child.width))
right = Math.max(right, child.x + child.width);
if (!isNaN(child.height))
bottom = Math.max(bottom, child.y + child.height);

I also notice some code in UIComponent (I think) that was calling
invalidateDisplayList() immediately after invalidateSize(). Do those
need to be paired? Perhaps my code which constructs PodChrome and
ReportModuleA needs to call invalidateDisplayList.


[flexcoders] Re: Mouse DOUBLE_CLICK not fired in Browser but in AIR

2008-07-29 Thread Vijay Ganesan

Not so if you add the drag handling code as in my original example:
private function onMouseDown(event:MouseEvent):void
{
  trace("onMouseDown");
  var ds:DragSource = new DragSource();
  DragManager.doDrag(this, ds, event);
}

Works in the AIR version.

--- In flexcoders@yahoogroups.com, "valdhor" <[EMAIL PROTECTED]> wrote:
>
> Given the following:
> 
> 
> http://www.adobe.com/2006/mxml";
> layout="absolute" creationComplete="creationCompleteHandler()">
>  
>  
>  
>  
>  
>  
> 
> 
> I get the following output if I double click the button:
> 
> onMouseDown
> onMouseClick
> onMouseDown
> onMouseDblClick
> 
> 
> --- In flexcoders@yahoogroups.com, "Vijay Ganesan" 
> wrote:
> >
> >
> > I need to handle MOUSE_DOWN because I'm enabling drag and drop.
> > Again the weird thing is that the AIR version works fine.
> >
> > --- In flexcoders@yahoogroups.com, "valdhor" stevedepp@ wrote:
> > >
> > > Don't quote me on this but it is probably because the
> > > MouseEvent.MOUSE_DOWN event is captured before a double click. If
> you
> > > change the event listener from MouseEvent.MOUSE_DOWN to
> > > MouseEvent.CLICK then it works as expected.
> > >
> > >
> > > --- In flexcoders@yahoogroups.com, "Vijay Ganesan"
> > >  wrote:
> > > >
> > > > I have the same code running in an AIR app and in a browser app -
> the
> > > > only difference being the containing mx:WindowedApplication versus
> > > > mx:Application. See code below for both. Double clicking on the
> button
> > > > in the AIR app works fine (MouseEvent.DOUBLE_CLICK gets fired) but
> the
> > > > same does not fire in the browser version. Can someone tell me
> what is
> > > > going on here?
> > > >
> > > > Thanks
> > > > Vijay
> > > >
> > > > AIR version:
> > > > 
> > > > http://www.adobe.com/2006/mxml";
> > > > layout="absolute" creationComplete="creationCompleteHandler()">
> > > >   
> > > > 
> > > >   
> > > >
> > > >   
> > > > 
> > > >   
> > > >
> > > > 
> > > >
> > > > Browser version:
> > > > 
> > > > http://www.adobe.com/2006/mxml";
> > > > layout="absolute" creationComplete="creationCompleteHandler()">
> > > >   
> > > > 
> > > >   
> > > >
> > > >   
> > > > 
> > > >   
> > > >
> > > > 
> > > >
> > >
> >
>




[flexcoders] Re: Programmatically select items in AdvancedDataGrid

2008-07-29 Thread fourctv
You have 2 options, set either adg.selectedItems or adg.selectedIndices.

--- In flexcoders@yahoogroups.com, "whatabrain" <[EMAIL PROTECTED]> wrote:
>
> Another old question, I'm sure, but I can't find an answer anywhere on 
> the web.
> 
> How do I cause a row to be selected in an AdvancedDataGrid? Basically, 
> when a top-level element is clicked, I want all of its child elements 
> to be selected.
>





RE: [flexcoders] MouseEvent's not firing

2008-07-29 Thread Alex Harui
Read the white paper on Player 9 security.  Use relative paths so you
can keep the helper SWF alongside your main SWF whether local or on
server,

 

Other than that, Security is a pain when you've locked your keys in the
car, but not when someone is trying to steal it.

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Patrick J. Jankun
Sent: Tuesday, July 29, 2008 2:07 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] MouseEvent's not firing

 

Alex, 

 

Thank you for the Tip, you were absolutely right about the Issue, after
changing the Domain

the same as the root .swf, all seems to work the right way.

 

This is a kind annoying, as if i put my files locally i got the issues
with security sandbox :|

since i try to load the file over network.. security is driving me crazy
since i first run into the

security sandbox warnings. im an totally newbie in as3, and my
experience is quite short,

any tips would be appreciated :)

 

cheers,

Patrick

 

On Jul 29, 2008, at 10:44 PM, Alex Harui wrote:





 

SWFs loaded from a different domain or SWFs built for Player 8 do not
dispatch mouse events.

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Patrick J. Jankun
Sent: Tuesday, July 29, 2008 11:50 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] MouseEvent's not firing

 

Hi Everyone,

 

I got a strange problem which i can't really understand,

i loaded an .swf through the loader, initialised it as an movieclip,
then 

initialised objects in it's library as classes to generate some
navigation items, 

put those itmes in an holder, added that holder to stage. it looks all
nice and 

how it's suppose to look like.

 

But, when i add an MouseEvent Listener to the holder object, those
mouseevents 

are never fired (?!?) and i clearly don't know why, since this is the
first time i 

run into such problem, can anyone help me out?

 

navHolder = new Sprite;

navHolder.addEventListener(MouseEvent.MOUSE_OVER, navOnMouseOver);

navHolder.addEventListener(MouseEvent.MOUSE_OUT, navOnMouseOut);

navHolder.addEventListener(MouseEvent.CLICK, navOnMouseClick);

addChild(navHolder);

 

this code should work out of the box, but it does not :|

and i can't trace the issue, if i put the eventlisteners directly 

on stage, the same events are fired on mouse actions..

 

any tips would be great,

 

chee! rs,

Patrick

 

 

 



RE: [flexcoders] Custom Context Menu in flex app

2008-07-29 Thread Alex Harui
Looks ok to me.  Make sure you're right clicking on the app and not
something that has its own context menu

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of vipinck
Sent: Tuesday, July 29, 2008 3:14 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Custom Context Menu in flex app

 

I am trying to add a custom context menu in my flex app. I am writing
below code in a method which i am calling on applicationComplete event
of the main application.

//
customMenu = new ContextMenu();
var saveItem:ContextMenuItem = new
ContextMenuItem("Save",true,true,true);
saveItem.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT,
doSaveCommand);
customMenu.hideBuiltInItems();
customMenu.customItems.push(saveItem);
Application.application.contextMenu = customMenu;

//

I am able to hide the default menu items when using the
customMenu.hideBuiltInItems(); code, but the custom 'Save' item is not
getting added.

What could be wrong?

Thnx
Vipin 

 



[flexcoders] Re: Getting current URL from iFrame

2008-07-29 Thread flexawesome
any suggestions? Thanks

--- In flexcoders@yahoogroups.com, "flexawesome" <[EMAIL PROTECTED]> 
wrote:
>
> Hey there,
> 
> I have a problem of getting URL address from iFrame,
> 
> I am using iFrame to link the Flex main.html ( generated by Flex ), 
I 
> am unable to use the AS to get the parent URL address.
> 
> ExternalInterface.call( "window.location.href.toString" );
> 
> Do you know how to retrieve the parent URL ( index.html ) from 
iFrame?
> 
> --index.html
> | ( uses iFrame to link main.html page )
> |
>-main.html
>|
>|
>   @embedded Flex file
> 
> Thank you
>




Re: [flexcoders] Execute click programmatically

2008-07-29 Thread yigit
use:
//dg is the id of the datagrid object
dg.dispatchEvent(new MouseEvent());

I'm not sure for the code, just written here. But the logic is
dispatching the event on behalf of the datagrid.

I remember using the same approach before, so it should work.

yigit

Daniel Gold wrote:
> are you using the MouseEvent in the event handler? If not, default 
> that parameter and just call the function directly
>
> private function clickHandler(event:MouseEvent=null):void
> {
> }
>
> private function otherFunction():void
> {
> clickHandler();
> }
>
> On Tue, Jul 29, 2008 at 8:30 PM, markgoldin_2000 
> <[EMAIL PROTECTED] > wrote:
>
> If I have a click listener on DG's cell can I execute cell's click
> programmatically, something like:
> cellObject.click()
> or somehow else to excute listener?
>
> Thanks
>
>
>  



Re: [flexcoders] Execute click programmatically

2008-07-29 Thread Daniel Gold
are you using the MouseEvent in the event handler? If not, default that
parameter and just call the function directly

private function clickHandler(event:MouseEvent=null):void
{
}

private function otherFunction():void
{
clickHandler();
}

On Tue, Jul 29, 2008 at 8:30 PM, markgoldin_2000
<[EMAIL PROTECTED]>wrote:

>   If I have a click listener on DG's cell can I execute cell's click
> programmatically, something like:
> cellObject.click()
> or somehow else to excute listener?
>
> Thanks
>
>  
>


[flexcoders] Execute click programmatically

2008-07-29 Thread markgoldin_2000
If I have a click listener on DG's cell can I execute cell's click 
programmatically, something like:
cellObject.click()
or somehow else  to excute listener?

Thanks



[flexcoders] Re: Error #2032: Stream Error. URL: datavisualization_3.0.0.477.swz

2008-07-29 Thread Vijay Ganesan
OK found the issue using the web server call as you suggested.
I had to explicitly specify the path to the .swz file in my build file:

[flexcoders] Re: Height Question

2008-07-29 Thread tchredeemed
For some reason, I could have sworn that is what I did in the first
place...

I kept on running through solutions I have tried, and that was the
first check in my head...

setting it up like that, it works fine.

thanks dude

--- In flexcoders@yahoogroups.com, "Josh McDonald" <[EMAIL PROTECTED]> wrote:
>
> What you're asking is doable, but you're definitinely going the
wrong way
> about it. Put the two vboxes in a canvas that doesn't have its
height set,
> and set the height on each vbox to 100%. Example:
> 
> 
> http://www.adobe.com/2006/mxml";
layout="absolute">
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
>  borderStyle="solid" height="100%">
> 
> 
> 
>  borderThickness="3" borderStyle="solid" height="100%">
> 
> 
> 
> 
> 
> 
> 
> 
> On Wed, Jul 30, 2008 at 10:21 AM, tchredeemed <[EMAIL PROTECTED]> wrote:
> 
> > Ok, I have two VBoxes, side by side, that need to both be the height
> > of the biggest of the two (children added dynamically on show).
> >
> > I do it this way:
> > leftVBox.minHeight = rightVBox.height;
> > rightVBox.minHeight = leftVBox.height;
> >
> > (if this is a stupid way to do it, let me know).
> >
> > The problem is this.
> >
> > When I add the children, and switch view states, I remove the
children.
> >
> > If I come back to that page, and add a different set of children, I
> > only want them to be the biggest they have to be, but I cannot get
> > them to resize back down to the right height, they hold the height of
> > the biggest set of children that has been added since launch time.
> >
> > Any ideas?
> >
> >
> > 
> >
> > --
> > Flexcoders Mailing List
> > FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> > Search Archives:
> > http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups
> > Links
> >
> >
> >
> >
> 
> 
> -- 
> "Therefore, send not to know For whom the bell tolls. It tolls for
thee."
> 
> :: Josh 'G-Funk' McDonald
> :: 0437 221 380 :: [EMAIL PROTECTED]
>




[flexcoders] Re: Question about Charts

2008-07-29 Thread Tim Hoff

Hi,

Since those are flash charts, you could probably use the swfLoader
control in flex.  Andy Trice has a gantt chart solution here
 .

-TH

--- In flexcoders@yahoogroups.com, "Cadu de Castro Alves"
<[EMAIL PROTECTED]> wrote:
>
> Hi people!
>
> I've been developing a Dashboard to my application.
> I figured out about free chart component. I found Fusion
> Chartsand I decided to use them.
> Now, I've a problem: how can I load these charts into my application?
> I just tried using the HTML Iframe solution, but I didn't achieve make
it
> works.
> Could somebody help me?
> Lastly, I'd like to know if somebody discovered a solution to a good
Gantt
> Chart. I need it to my project and
> I don't achieve to solve my problem yet.
>
> Thanks in advance!
>
> Cadu de Castro Alves
> http://www.cadudecastroalves.com
>




[flexcoders] Re: How long to build a Flex app....

2008-07-29 Thread Amy
--- In flexcoders@yahoogroups.com, "Gordon Smith" <[EMAIL PROTECTED]> wrote:
>
> > if you're like me, and you're in the 20% of cases
> 
> > the Flex developers didn't plan for 90% of the time
> 
>  
> 
> Amy, do you think that your use cases are simply different from those 
of
> most Flex developers? Or do you think that the Flex framework is 
failing
> to anticipate the use cases of most Flex developers? If it's the 
latter,
> we need to try to do a better job with Gumbo and we need folks to file
> enhancement requests to help us.

I think it's a little of both, and I do have some enhancement requests 
stored up, but I haven't bitten the bullet and dived into the jira 
system :-).

I can at least think of one place where the Framework is lacking, but I 
suspect Gumbo may already be addressing it.  That place is where we 
have all these great building blocks like the container class, but 
those classes are too "heavy" for use as itemRenderers without a big 
performance hit.  So nearly all developers who are working with 
itemRenderers wind up rebuilding a "light" version of the containers 
starting with UIComponent.

I was really pleased to see that Gumbo is addressing the issue of how 
difficult it can be to come to grips with the component life cycle.  
One thing that I sometimes miss about Authorware is that in Authorware 
you can actually watch the screen draw as various logic executes while 
you're developing.  I think if you could see the screen draw as the 
logic ran in debug mode in Flex that would help in understanding what 
is happening when.  I know that on my husband's mac, the screen isn't 
totally white when he hits a breakpoint like it is on my PC, but I am 
not sure how real time what he sees is.

Thanks :-)

Amy



Re: [flexcoders] Height Question

2008-07-29 Thread Josh McDonald
What you're asking is doable, but you're definitinely going the wrong way
about it. Put the two vboxes in a canvas that doesn't have its height set,
and set the height on each vbox to 100%. Example:


http://www.adobe.com/2006/mxml"; layout="absolute">

























On Wed, Jul 30, 2008 at 10:21 AM, tchredeemed <[EMAIL PROTECTED]> wrote:

> Ok, I have two VBoxes, side by side, that need to both be the height
> of the biggest of the two (children added dynamically on show).
>
> I do it this way:
> leftVBox.minHeight = rightVBox.height;
> rightVBox.minHeight = leftVBox.height;
>
> (if this is a stupid way to do it, let me know).
>
> The problem is this.
>
> When I add the children, and switch view states, I remove the children.
>
> If I come back to that page, and add a different set of children, I
> only want them to be the biggest they have to be, but I cannot get
> them to resize back down to the right height, they hold the height of
> the biggest set of children that has been added since launch time.
>
> Any ideas?
>
>
> 
>
> --
> Flexcoders Mailing List
> FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> Search Archives:
> http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups
> Links
>
>
>
>


-- 
"Therefore, send not to know For whom the bell tolls. It tolls for thee."

:: Josh 'G-Funk' McDonald
:: 0437 221 380 :: [EMAIL PROTECTED]


Re: [flexcoders] MouseEvent's not firing

2008-07-29 Thread Patrick J. Jankun

Alex,

Thank you for the Tip, you were absolutely right about the Issue,  
after changing the Domain

the same as the root .swf, all seems to work the right way.

This is a kind annoying, as if i put my files locally i got the issues  
with security sandbox :|
since i try to load the file over network.. security is driving me  
crazy since i first run into the
security sandbox warnings. im an totally newbie in as3, and my  
experience is quite short,

any tips would be appreciated :)

cheers,
Patrick

On Jul 29, 2008, at 10:44 PM, Alex Harui wrote:



SWFs loaded from a different domain or SWFs built for Player 8 do  
not dispatch mouse events.




From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED]  
On Behalf Of Patrick J. Jankun

Sent: Tuesday, July 29, 2008 11:50 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] MouseEvent's not firing



Hi Everyone,



I got a strange problem which i can't really understand,

i loaded an .swf through the loader, initialised it as an movieclip,  
then


initialised objects in it's library as classes to generate some  
navigation items,


put those itmes in an holder, added that holder to stage. it looks  
all nice and


how it's suppose to look like.



But, when i add an MouseEvent Listener to the holder object, those  
mouseevents


are never fired (?!?) and i clearly don't know why, since this is  
the first time i


run into such problem, can anyone help me out?



navHolder = new Sprite;

navHolder.addEventListener(MouseEvent.MOUSE_OVER, navOnMouseOver);

navHolder.addEventListener(MouseEvent.MOUSE_OUT, navOnMouseOut);

navHolder.addEventListener(MouseEvent.CLICK, navOnMouseClick);

addChild(navHolder);



this code should work out of the box, but it does not :|

and i can't trace the issue, if i put the eventlisteners directly

on stage, the same events are fired on mouse actions..



any tips would be great,



chee! rs,

Patrick







[flexcoders] Question about Charts

2008-07-29 Thread Cadu de Castro Alves
Hi people!

I've been developing a Dashboard to my application.
I figured out about free chart component. I found Fusion
Chartsand I decided to use them.
Now, I've a problem: how can I load these charts into my application?
I just tried using the HTML Iframe solution, but I didn't achieve make it
works.
Could somebody help me?
Lastly, I'd like to know if somebody discovered a solution to a good Gantt
Chart. I need it to my project and
I don't achieve to solve my problem yet.

Thanks in advance!

Cadu de Castro Alves
http://www.cadudecastroalves.com


[flexcoders] Height Question

2008-07-29 Thread tchredeemed
Ok, I have two VBoxes, side by side, that need to both be the height
of the biggest of the two (children added dynamically on show).

I do it this way:
leftVBox.minHeight = rightVBox.height;
rightVBox.minHeight = leftVBox.height;

(if this is a stupid way to do it, let me know).

The problem is this.

When I add the children, and switch view states, I remove the children.

If I come back to that page, and add a different set of children, I
only want them to be the biggest they have to be, but I cannot get
them to resize back down to the right height, they hold the height of
the biggest set of children that has been added since launch time.

Any ideas?



[flexcoders] Programmatically select items in AdvancedDataGrid

2008-07-29 Thread whatabrain
Another old question, I'm sure, but I can't find an answer anywhere on 
the web.

How do I cause a row to be selected in an AdvancedDataGrid? Basically, 
when a top-level element is clicked, I want all of its child elements 
to be selected.



RE: [flexcomponents] RE: [flexcoders] Re: Measurement and template component

2008-07-29 Thread Alex Harui
I think it is time to start a new thread with the current state of the
world.  I'm having trouble following.

 

Which container should have scrollbars?  What are the
minMeasuredWidth/minWidth (and heights) at each level and which levels
have % width/height

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Richard Rodseth
Sent: Tuesday, July 29, 2008 3:40 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcomponents] RE: [flexcoders] Re: Measurement and
template component

 

Sorry about the indenting. I keep forgetting to put periods in. It's
like this

TiledCanvas
..PodChrome
ReportModuleA (not a real module, just a VBox)
..ReportChrome
ReportA
..Grid

I also apologize for giving incorrect information earlier. The
measure() methods *are* all getting called and the values look right.
i.e. if I set ReportA to minimum 500x500 that shows up all the way up
the hierarchy. Yet, if I set ReportChrome to 100%/100% the scroll bars
don't appear, but if I don't do that, they do. Very puzzling. My
theory about parentApplication is probably wrong, because I set a
break in UIComponent.get parentApplication and it only got called when
showing a progress window.
So now I am setting break points in
Container.createScrollbarsIfNeeded, but in the case where the
percentages are set, it doesn't get to the needVertical=true part.
I'll keep digging, but any suggestions for further key logic points to
check would be appreciated. I assume getScrollableRect() is returning
a different value, but I can't imagine why that would be.

On Tue, Jul 29, 2008 at 1:47 PM, Alex Harui <[EMAIL PROTECTED]
 > wrote:
> You know that any indenting you do in the hierarchy doesn't come
through
> email, right? The whole list is flat.
>
>
>
> If a measure() method does not get called then either nobody called
> invalidateSize() on it (or caused it to be called via some deeper
> invalidation), or it has fixed width/height and doesn't need to be
measured.
>
>
>
> 
>
> From: flexcoders@yahoogroups.com 
[mailto:flexcoders@yahoogroups.com 
] On
> Behalf Of Richard Rodseth
> Sent: Tuesday, July 29, 2008 11:47 AM
> To: flexcoders@yahoogroups.com  
> Subject: Re: [flexcomponents] RE: [flexcoders] Re: Measurement and
template
> component
>
>
>
> Actually, I take it back. Only the pseudo-module names are determined
> in the service layer - instantiation occurs in an observer. Still,
> tI'm concerned about the messed-up parentApplication.
>
> On Tue, Jul 29, 2008 at 11:33 AM, Richard Rodseth <[EMAIL PROTECTED]
 >
> wrote:
>> Good suggestion. For good measure (groan) I added a few overrides of
>> measure() that call super, that I could set breakpoints in.
>> Recall that the hierarchy is like this:
>>
>> TiledCanvas
>> PodChrome
>> ReportModuleA (not a real module, just a VBox)
>> ReportChrome
>> ReportA
>> Grid
>>
>> I notice that ReportModuleA.measure() does not get called. I also
>> noticed in the debugger that ReportModuleA.parentApplication is not
>> set (the debugger gives a 1009 error) when you select that property).
>> Seems suspect, doesn't it?
>>
>> ReportModuleA and PodChrome are instantiated in ActionScript, and
>> ReportModuleA is actually instantiated in the service layer via a
>> static method in its MXML file. Then a parent of TiledCanvas observes
>> a list of the pseudo-modules, wraps them in chrome and adds them to
>> the TiledCanvas. Seemed reasonable at the time.
>>
>> On Mon, Jul 28, 2008 at 9:46 PM, Alex Harui <[EMAIL PROTECTED]
 > wrote:
>>> You'll have to walk through the measure() methods on each container
to
>>> see
>>> what it is computing and why.
>>>
>>>
>>>
>>> 
>>>
>>> From: flexcoders@yahoogroups.com

[mailto:flexcoders@yahoogroups.com 
] On
>>> Behalf Of Richard Rodseth
>>> Sent: Monday, July 28, 2008 2:19 PM
>>> To: [EMAIL PROTECTED]
 ; flexcoders@yahoogroups.com
 
>>> Subject: [flexcoders] Re: Measurement and template component
>>>
>>>
>>>
>>> Oops. Meant for flexcoders.
>>>
>>> On Mon, Jul 28, 2008 at 2:18 PM, Richard Rodseth <[EMAIL PROTECTED]
 >
>>> wrote:
 Turns out to be unrelated to the fact that ReportChrome is a
template
 component (the same thing happens if it's a plain Canvas).
 Removing width="100%" height="100%" on ReportChrome results in the
 TiledCanvas tiling correctly but then I am forced to set
 minWidth/Height on ReportA or its children, or they shrink to
nothing.

 I'm not sure I understand this - I would expect that the measured
 values would bubble up regardless, 

Re: [flexcoders] Re: Free Flex Gauge Component

2008-07-29 Thread Vivian Richard
   Hey Thomas thanks for informing us about the update
   and as usual very good job!!! BTW I have a question -
   why it is still in .4 version? It looks it works perfect; if
   so then why not version 1.0?

   For everyone else if Thomas's email link (You can see it
here
)

   do not take you to the example, try this link:

  http://www.brightpointinc.com/flexdemos/gauge_v04/gauge_v04.html



On Tue, Jul 29, 2008 at 9:49 AM, twgonzalez <[EMAIL PROTECTED]>wrote:

>   --- In flexcoders@yahoogroups.com, "twgonzalez" <[EMAIL PROTECTED]> wrote:
> Update v.04 released New features: Alert Levels Log Scale BounceEffect
> on/off More accurate tick marks You can see it 
> here
>  .
>
>  
>


Re: [flexcoders] Re: HttpService Fault Response Body Decoding

2008-07-29 Thread Josh McDonald
Your blazeds http transport is going fine, otherwise you wouldn't see
anything in message, faultcode, etc. The problem is either in the proxy
server itself, or the server you're trying to talk to.

-Josh

On Tue, Jul 29, 2008 at 3:33 PM, ron_mori <[EMAIL PROTECTED]> wrote:

> I must be missing something obvious -
>
> Using an httpService proxy to the backend server like so in my
> proxy-config:
>
>
>http://myServer:8080/myApp
>
>
>
> Executing a simple test, I monitor the traffic on the client
> (Wireshark) and find the desired xml body in the response http 1.1
> status 500 Internal Server Error message from the backend server.
>
> Dumping the FaultEvent in the client (ObjectUtil.toString()) contains:
> ...
>  fault = (mx.rpc::Fault)#18
>errorID = 0
>faultCode = "Server.Proxy.Request.Failed"
>faultDetail = "HTTP/1.1 500 Internal Server Error"
>faultString = "HTTP/1.1 500 Internal Server Error"
>message = "faultCode:Server.Proxy.Request.Failed
> faultString:'HTTP/1.1 500 Internal Server Error' faultDetail:'HTTP/1.1
> 500 Internal Server Error'"
>name = "Error"
>rootCause = (null)
> ...
> Also the '.result' is null.
>
> So no sign of the response xml body.  Again this was a faultEvent.
> --
> I thought, might the proxy-config default channel of my-amf be
> incorrect?  Since I'm working with http, I tried the my-http channel
> but that threw an exception.
>
> in a word: help.
>
>
> 
>
> --
> Flexcoders Mailing List
> FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> Search Archives:
> http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups
> Links
>
>
>
>


-- 
"Therefore, send not to know For whom the bell tolls. It tolls for thee."

:: Josh 'G-Funk' McDonald
:: 0437 221 380 :: [EMAIL PROTECTED]


[flexcoders] Re: Flex 2.01 date problem

2008-07-29 Thread aceoohay
I get it.

Don't know who thought this up, but I could have sold the water they 
were drinking for big bucks back in the '70s.

Thanks

Paul



[flexcoders] Event for shift-click

2008-07-29 Thread Kevin Ford
I'm running into a bit of frustration on an AdvancedDataGrid control with
allowMultipleSelection turned on. I currently fire-off a function on the
ADG's change event and this works perfectly fine if I single-click or
control-click on a row in the control, but not if I shift-click. I've tried
triggering on "change", "itemClick", and "click" events and none seem to
trigger when doing a straight shift-click selection. If I do a shift-click
to highlight several rows, then do a control-click to highlight another then
everything highlighted does get recognized. Is there a specific event that I
can trigger on for shift-click selections?
Without showing too much of the code, here's my definition for the ADG...







Thanks!
Kevin


Re: [flexcomponents] RE: [flexcoders] Re: Measurement and template component

2008-07-29 Thread Richard Rodseth
Sorry about the indenting. I keep forgetting to put periods in. It's like this

TiledCanvas
..PodChrome
ReportModuleA (not a real module, just a VBox)
..ReportChrome
ReportA
..Grid

I also apologize for giving incorrect information earlier. The
measure() methods *are* all getting called and the values look right.
i.e. if I set ReportA to minimum 500x500 that shows up all the way up
the hierarchy. Yet, if I set ReportChrome to 100%/100% the scroll bars
don't appear, but if I don't do that, they do. Very puzzling. My
theory about parentApplication is probably wrong, because I set a
break in UIComponent.get parentApplication and it only got called when
showing a progress window.
So now I am setting break points in
Container.createScrollbarsIfNeeded, but in the case where the
percentages are set, it doesn't get to the needVertical=true part.
I'll keep digging, but any suggestions for further key logic points to
check would be appreciated. I assume getScrollableRect() is returning
a different value, but I can't imagine why that would be.

On Tue, Jul 29, 2008 at 1:47 PM, Alex Harui <[EMAIL PROTECTED]> wrote:
> You know that any indenting you do in the hierarchy doesn't come through
> email, right?  The whole list is flat.
>
>
>
> If a measure() method does not get called then either nobody called
> invalidateSize() on it (or caused it to be called via some deeper
> invalidation), or it has fixed width/height and doesn't need to be measured.
>
>
>
> 
>
> From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
> Behalf Of Richard Rodseth
> Sent: Tuesday, July 29, 2008 11:47 AM
> To: flexcoders@yahoogroups.com
> Subject: Re: [flexcomponents] RE: [flexcoders] Re: Measurement and template
> component
>
>
>
> Actually, I take it back. Only the pseudo-module names are determined
> in the service layer - instantiation occurs in an observer. Still,
> tI'm concerned about the messed-up parentApplication.
>
> On Tue, Jul 29, 2008 at 11:33 AM, Richard Rodseth <[EMAIL PROTECTED]>
> wrote:
>> Good suggestion. For good measure (groan) I added a few overrides of
>> measure() that call super, that I could set breakpoints in.
>> Recall that the hierarchy is like this:
>>
>> TiledCanvas
>> PodChrome
>> ReportModuleA (not a real module, just a VBox)
>> ReportChrome
>> ReportA
>> Grid
>>
>> I notice that ReportModuleA.measure() does not get called. I also
>> noticed in the debugger that ReportModuleA.parentApplication is not
>> set (the debugger gives a 1009 error) when you select that property).
>> Seems suspect, doesn't it?
>>
>> ReportModuleA and PodChrome are instantiated in ActionScript, and
>> ReportModuleA is actually instantiated in the service layer via a
>> static method in its MXML file. Then a parent of TiledCanvas observes
>> a list of the pseudo-modules, wraps them in chrome and adds them to
>> the TiledCanvas. Seemed reasonable at the time.
>>
>> On Mon, Jul 28, 2008 at 9:46 PM, Alex Harui <[EMAIL PROTECTED]> wrote:
>>> You'll have to walk through the measure() methods on each container to
>>> see
>>> what it is computing and why.
>>>
>>>
>>>
>>> 
>>>
>>> From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
>>> Behalf Of Richard Rodseth
>>> Sent: Monday, July 28, 2008 2:19 PM
>>> To: [EMAIL PROTECTED]; flexcoders@yahoogroups.com
>>> Subject: [flexcoders] Re: Measurement and template component
>>>
>>>
>>>
>>> Oops. Meant for flexcoders.
>>>
>>> On Mon, Jul 28, 2008 at 2:18 PM, Richard Rodseth <[EMAIL PROTECTED]>
>>> wrote:
 Turns out to be unrelated to the fact that ReportChrome is a template
 component (the same thing happens if it's a plain Canvas).
 Removing width="100%" height="100%" on ReportChrome results in the
 TiledCanvas tiling correctly but then I am forced to set
 minWidth/Height on ReportA or its children, or they shrink to nothing.

 I'm not sure I understand this - I would expect that the measured
 values would bubble up regardless, and that the measured width/height
 of a Canvas or subclass thereof (ReportChrome in this case) would be
 the maximum of the measured children or the specified container
 percentage.

 On Wed, Jul 23, 2008 at 5:18 PM, Richard Rodseth <[EMAIL PROTECTED]>
 wrote:
> My application has a structure like this, portions of which are
> created dynamically:
>
> TiledCanvas
> PodChrome(1)
> ReportModuleA
> ReportChrome(1)
> ReportA
> Grid
> PodChrome(2)
> ReportModuleB
> ReportChrome(2)
> ReportB
> Chart
> etc.
>
> PodChrome and ReportChrome are template components.
> TiledCanvas is functional - when tiling it correctly reflects a
> minWidth/minHeight set way deep (eg. on the Grid). But only if I omit
> the ReportChrome wrapper. ReportChrome is just a Canvas with two
> states, that does an addChild in init(). I added a call to
> this.invalida

Re: [flexcoders] flex 2/3 charting questions

2008-07-29 Thread Maciek
No, it's a separate file. It used to be available from Adobe, but is not
any longer: there are still Flex 2 Charting links on Adobe's web site,
but they all point to FB3Pro...

-Maciek


On Tue, 2008-07-29 at 12:07 +0100, Tom Chiverton wrote:
> On Tuesday 29 Jul 2008, Maciek wrote:
> > We need to build a Flex 2 project that uses Flex Charting. Is it
> > possible to download Flex Charting 2?
> 
> I think it's included in the SDK, but watermarked. Could be wrong.
> 
> > seem to point to FlexBuilder 3. I know that FlexBuilder 3 includes the
> > Flex 2 SDK: with the pro version (that includes Flex 3 Charting), is it
> > possible to build a project with the Flex 2 SDK but using Flex 3
> > Charting? 
> 
> No.
> 
> > from places like Amazon, but this is really sort of a one-time
> > build--the watermarks are not important and shortly afterwards we're
> > planning to move to Flex 3.
> 
> Just use the Flex 2 SDK then.
> 




[flexcoders] Re: Flex 2.01 date problem

2008-07-29 Thread Tim Hoff

This would also happen if today was the 31st and you changed to a month
that had 30 or 28 days.

-TH

--- In flexcoders@yahoogroups.com, "Gordon Smith" <[EMAIL PROTECTED]> wrote:
>
> Your code leads to the same invalid value.
>
>
>
> When you don't pass any arguments to the Date constructor, you get a
> Date representing "right now", so 'date' is 29 because today is the
> 29th. When you then set the fullYear to 1987 and then month to 1
> (February), you get the invalid date Feburary 29, 1987 which is
> intepreted as March 1, 1987. You then set the 'date' to 3 and get
March
> 3, 1987.
>
>
>
> In more detail, here is how I think the Player is executing your code
on
> July 29, 2008 (today):
>
>
>
> var d:Date = new Date;
>
> // d represents July 29, 2008
>
> // d.fullYear is 2008
>
> // d.month is 6 (July)
>
> // d.date is 29
>
>
>
> d.fullYear = 1987;
>
> // d represents July 29, 1987
>
> // d.fullYear is 1987
>
> // d.month is 6 (July)
>
> // d.date is 29
>
> d.month = 1; // (February)
> // d represents February 29, 1987 -- OOPS! This is invalid but
> "equivalent" to March 1, 1987, so now
>
> // d.fullYear is 1987
>
> // d.month is 2 (March)
>
> // d.date is 1
>
>
>
> d.date = 3;
> // d represents March 3, 1987
>
> // d.fullYear is 1987
>
> // d.month is 2 (March)
>
> // d.date is 3
>
>
>
> Please go ahead and file a bug against Flex and we'll transfer it into
> the Player team's bugbase for them to determine whether this behavior
is
> consistent with the Ecmascript spec or not. Be sure to indicate that
you
> are executing this code on July 29, 2008 because the fact that today
is
> the 29th is crucial.
>
>
>
> Gordon Smith
>
> Adobe Flex SDK Team
>
>
>
> 
>
> From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED]
On
> Behalf Of aceoohay
> Sent: Tuesday, July 29, 2008 3:09 PM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Re: Flex 2.01 date problem
>
>
>
> What you have shown is that if you use invalid data (February 29th
> of a non leap year) you get bad results. What I showed (February 3rd
> of a non leap year) was that if I use valid data I get invalid
> results.
>
> I truly believe this is a bug.
>
> Paul
> --- In flexcoders@yahoogroups.com

> , "Gordon Smith" gosmith@
> wrote:
> >
> > A simpler test is
> >
> >
> >
> > var d:Date = new Date(1987, 1, 29);
> > trace(d);
> >
> >
> >
> > This traces "Sun Mar 1 00:00:00 GMT-0800 1987", presumably because
> 1987
> > didn't have a February 29. So I doubt waht you're seeing is a bug.
> (I'd
> > have to check the Ecmascript spec to say for sure.) But it means
> that
> > using Date correctly is much trickier than I ever realized!
> >
> >
> >
> > Gordon Smith
> >
> > Adobe Flex SDK Team
> >
> >
> >
> > 
> >
> > From: flexcoders@yahoogroups.com

>
> [mailto:flexcoders@yahoogroups.com

> ] On
> > Behalf Of Matt Chotin
> > Sent: Tuesday, July 29, 2008 2:31 PM
> > To: flexcoders@yahoogroups.com 
> > Subject: Re: [flexcoders] Re: Flex 2.01 date problem
> >
> >
> >
> > Try setting the date before you set the month? I think setting the
> month
> > while the current day is later than 28 is going to roll the month
> on you
> > potentially? Just by reording that I got it to work. When I tried
> to set
> > the Date's time to 0 to avoid it using the current date that
> didn't seem
> > to fix things...
> >
> > It does feel like an odd error though. Might be worth filing a
> Flash
> > Player bug at http://bugs.adobe.com/jira.
> 
>  >
> > Though would be good to test JavaScript to see if it behaves the
> same.
> >
> > Matt
> >
> > On 7/29/08 2:14 PM, "aceoohay" pauls@
> >  > wrote:
> >
> > Just as a test I used the following;
> >
> > dtTest = new Date(1987,1,3,0,0,0,0);
> >
> > This returned;
> >
> > dtTest.toDateString()=Tue Feb 3 1987
> >
> > which is what I expected. I am so confused.
> >
> > Any ideas?
> >
> > Paul
> >
> > --- In flexcoders@yahoogroups.com
>   40yahoogroups.com>
> >  , "aceoohay"  wrote:
> > >
> > > The following code yields unexpected results on a date;
> > >
> > > var dtTest:Date = new Date;
> > > dtTest.fullYear = 1987;
> > > dtTest.month = 1;
> > > dtTest.date = 3;
> > > trace('dtTest.toDateString()=' +
> > > dtTest.toDateString());
> > >
> > > The result is;
> > >
> > > dtTest.toDateString()=Tue Mar 3 1987
> > >
> > > It is my understanding that this should be February not March.
> > What am
> > > I doing wrong? or is there a bug in the Date object?
> > >
> > > Paul
> > >
> >
>





Re: [flexcoders] Re: Flex 2.01 date problem

2008-07-29 Thread Matt Chotin
Actually, you can file directly against the flash Player when going into JIRA 
these days :-)


On 7/29/08 3:32 PM, "Gordon Smith" <[EMAIL PROTECTED]> wrote:




Your code leads to the same invalid value.

When you don't pass any arguments to the Date constructor, you get a Date 
representing "right now", so 'date' is 29 because today is the 29th. When you 
then set the fullYear to 1987 and then month to 1 (February), you get the 
invalid date Feburary 29, 1987 which is intepreted as March 1, 1987. You then 
set the 'date' to 3 and get March 3, 1987.

In more detail, here is how I think the Player is executing your code on July 
29, 2008 (today):

var d:Date = new Date;
   // d represents July 29, 2008
   // d.fullYear is 2008
   // d.month is 6 (July)
   // d.date is 29


d.fullYear = 1987;
   // d represents July 29, 1987
   // d.fullYear is 1987
   // d.month is 6 (July)
   // d.date is 29

d.month = 1; // (February)
   // d represents February 29, 1987 -- OOPS!  This is invalid but "equivalent" 
to March 1, 1987, so now
   // d.fullYear is 1987
   // d.month is 2 (March)
   // d.date is 1


d.date = 3;
   // d represents March 3, 1987
   // d.fullYear is 1987
   // d.month is 2 (March)
   // d.date is 3


Please go ahead and file a bug against Flex and we'll transfer it into the 
Player team's bugbase for them to determine whether this behavior is consistent 
with the Ecmascript spec or not. Be sure to indicate that you are executing 
this code on July 29, 2008 because the fact that today is the 29th is crucial.

Gordon Smith
Adobe Flex SDK Team




From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of aceoohay
Sent: Tuesday, July 29, 2008 3:09 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Flex 2.01 date problem


What you have shown is that if you use invalid data (February 29th
of a non leap year) you get bad results. What I showed (February 3rd
of a non leap year) was that if I use valid data I get invalid
results.

I truly believe this is a bug.

Paul
--- In flexcoders@yahoogroups.com  , 
"Gordon Smith" <[EMAIL PROTECTED]>
wrote:
>
> A simpler test is
>
>
>
> var d:Date = new Date(1987, 1, 29);
> trace(d);
>
>
>
> This traces "Sun Mar 1 00:00:00 GMT-0800 1987", presumably because
1987
> didn't have a February 29. So I doubt waht you're seeing is a bug.
(I'd
> have to check the Ecmascript spec to say for sure.) But it means
that
> using Date correctly is much trickier than I ever realized!
>
>
>
> Gordon Smith
>
> Adobe Flex SDK Team
>
>
>
> 
>
> From: flexcoders@yahoogroups.com 
[mailto:flexcoders@yahoogroups.com  ] On
> Behalf Of Matt Chotin
> Sent: Tuesday, July 29, 2008 2:31 PM
> To: flexcoders@yahoogroups.com 
> Subject: Re: [flexcoders] Re: Flex 2.01 date problem
>
>
>
> Try setting the date before you set the month? I think setting the
month
> while the current day is later than 28 is going to roll the month
on you
> potentially? Just by reording that I got it to work. When I tried
to set
> the Date's time to 0 to avoid it using the current date that
didn't seem
> to fix things...
>
> It does feel like an odd error though. Might be worth filing a
Flash
> Player bug at http://bugs.adobe.com/jira.

> Though would be good to test JavaScript to see if it behaves the
same.
>
> Matt
>
> On 7/29/08 2:14 PM, "aceoohay" <[EMAIL PROTECTED]
>  > wrote:
>
> Just as a test I used the following;
>
> dtTest = new Date(1987,1,3,0,0,0,0);
>
> This returned;
>
> dtTest.toDateString()=Tue Feb 3 1987
>
> which is what I expected. I am so confused.
>
> Any ideas?
>
> Paul
>
> --- In flexcoders@yahoogroups.com  
> 
>  , "aceoohay"  wrote:
> >
> > The following code yields unexpected results on a date;
> >
> > var dtTest:Date = new Date;
> > dtTest.fullYear = 1987;
> > dtTest.month = 1;
> > dtTest.date = 3;
> > trace('dtTest.toDateString()=' +
> > dtTest.toDateString());
> >
> > The result is;
> >
> > dtTest.toDateString()=Tue Mar 3 1987
> >
> > It is my understanding that this should be February not March.
> What am
> > I doing wrong? or is there a bug in the Date object?
> >
> > Paul
> >
>





RE: [flexcoders] MouseEvent's not firing

2008-07-29 Thread Alex Harui
I'm not sure I understand your configuration.  You'll have to read up on
Flash Security.

 

If you own both domains, you can give one domain permission to use the
other via crossdomain.xml.  If you can't get permission to access the
other domain's swf from your domain, you'll have to try to break down
the security barrier which will only be possible by cooperation from
that other SWF.

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Patrick J. Jankun
Sent: Tuesday, July 29, 2008 1:53 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] MouseEvent's not firing

 

Dear Alex,

 

I just realised that the problem is actually cause of casting an class
from an loaded .swf,

but this .swf is actually an flash9 swf's, but it's loaded from an
different domain then the root

.swf.. hmm strange, i didnt knew that :|

 

I'm using the Bulk-Loader class to load some assets needed to built my
Gui, and then i initialize

those loaded objects as classes, and then i generate the gui based on
that classes, so the problem

is that i load the .swf from an different domain then the root .swf, i
actually upped the assets movie

only for testing, can you give me some advice how to make this the right
way?

 

thanks for your answer!

Patrick

 

 

On Jul 29, 2008, at 10:44 PM, Alex Harui wrote:





 

SWFs loaded from a different domain or SWFs built for Player 8 do not
dispatch mouse events.

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Patrick J. Jankun
Sent: Tuesday, July 29, 2008 11:50 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] MouseEvent's not firing

 

Hi Everyone,

 

I got a s! trange problem which i can't really understand,

i loaded an .swf through the loader, initialised it as an movieclip,
then 

initialised objects in it's library as classes to generate some
navigation items, 

put those itmes in an holder, added that holder to stage. it looks all
nice and 

! how it's suppose to look like.

 

But, when i add an MouseEvent Listener to the holder object, those
mouseevents 

are never fired (?!?) and i clearly don't know why, since this is the
first time i 

run into such problem, can anyone help me out?

 

navHolder = new Sprite;

navHolder.addEventListener(MouseEvent.MOUSE_OVER, navOnMouseOver);

navHolder.addEventListener(MouseEvent.MOUSE_OUT, navOnMouseOut);

navHolder.addEventListener(MouseEvent.CLICK, navOnMouseClick);

addChild(navHolder);

 

this code should work out of the box, but it does not :|

and i can't trace the issue, if i put the eventlisteners directly 

on stage, the same events are fired on mouse actions..

 

any tips would be great,

 

chee! rs,

Patrick

 





 



RE: [flexcoders] Re: Flex 2.01 date problem

2008-07-29 Thread Gordon Smith
Your code leads to the same invalid value.

 

When you don't pass any arguments to the Date constructor, you get a
Date representing "right now", so 'date' is 29 because today is the
29th. When you then set the fullYear to 1987 and then month to 1
(February), you get the invalid date Feburary 29, 1987 which is
intepreted as March 1, 1987. You then set the 'date' to 3 and get March
3, 1987.

 

In more detail, here is how I think the Player is executing your code on
July 29, 2008 (today):

 

var d:Date = new Date;

   // d represents July 29, 2008

   // d.fullYear is 2008

   // d.month is 6 (July)

   // d.date is 29



d.fullYear = 1987;

   // d represents July 29, 1987

   // d.fullYear is 1987

   // d.month is 6 (July)

   // d.date is 29
   
d.month = 1; // (February)
   // d represents February 29, 1987 -- OOPS!  This is invalid but
"equivalent" to March 1, 1987, so now

   // d.fullYear is 1987

   // d.month is 2 (March)

   // d.date is 1



d.date = 3;
   // d represents March 3, 1987

   // d.fullYear is 1987

   // d.month is 2 (March)

   // d.date is 3



Please go ahead and file a bug against Flex and we'll transfer it into
the Player team's bugbase for them to determine whether this behavior is
consistent with the Ecmascript spec or not. Be sure to indicate that you
are executing this code on July 29, 2008 because the fact that today is
the 29th is crucial.

 

Gordon Smith

Adobe Flex SDK Team

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of aceoohay
Sent: Tuesday, July 29, 2008 3:09 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Flex 2.01 date problem

 

What you have shown is that if you use invalid data (February 29th 
of a non leap year) you get bad results. What I showed (February 3rd 
of a non leap year) was that if I use valid data I get invalid 
results.

I truly believe this is a bug.

Paul
--- In flexcoders@yahoogroups.com 
, "Gordon Smith" <[EMAIL PROTECTED]> 
wrote:
>
> A simpler test is
> 
> 
> 
> var d:Date = new Date(1987, 1, 29);
> trace(d);
> 
> 
> 
> This traces "Sun Mar 1 00:00:00 GMT-0800 1987", presumably because 
1987
> didn't have a February 29. So I doubt waht you're seeing is a bug. 
(I'd
> have to check the Ecmascript spec to say for sure.) But it means 
that
> using Date correctly is much trickier than I ever realized!
> 
> 
> 
> Gordon Smith
> 
> Adobe Flex SDK Team 
> 
> 
> 
> 
> 
> From: flexcoders@yahoogroups.com 

[mailto:flexcoders@yahoogroups.com 
] On
> Behalf Of Matt Chotin
> Sent: Tuesday, July 29, 2008 2:31 PM
> To: flexcoders@yahoogroups.com  
> Subject: Re: [flexcoders] Re: Flex 2.01 date problem
> 
> 
> 
> Try setting the date before you set the month? I think setting the 
month
> while the current day is later than 28 is going to roll the month 
on you
> potentially? Just by reording that I got it to work. When I tried 
to set
> the Date's time to 0 to avoid it using the current date that 
didn't seem
> to fix things...
> 
> It does feel like an odd error though. Might be worth filing a 
Flash
> Player bug at http://bugs.adobe.com/jira.
  
 >
> Though would be good to test JavaScript to see if it behaves the 
same.
> 
> Matt
> 
> On 7/29/08 2:14 PM, "aceoohay" <[EMAIL PROTECTED]
>  > wrote:
> 
> Just as a test I used the following;
> 
> dtTest = new Date(1987,1,3,0,0,0,0);
> 
> This returned;
> 
> dtTest.toDateString()=Tue Feb 3 1987
> 
> which is what I expected. I am so confused.
> 
> Any ideas?
> 
> Paul
> 
> --- In flexcoders@yahoogroups.com
  
>  , "aceoohay"  wrote:
> >
> > The following code yields unexpected results on a date;
> >
> > var dtTest:Date = new Date;
> > dtTest.fullYear = 1987;
> > dtTest.month = 1;
> > dtTest.date = 3;
> > trace('dtTest.toDateString()=' +
> > dtTest.toDateString());
> >
> > The result is;
> >
> > dtTest.toDateString()=Tue Mar 3 1987
> >
> > It is my understanding that this should be February not March.
> What am
> > I doing wrong? or is there a bug in the Date object?
> >
> > Paul
> >
>

 



[flexcoders] Re: Flex 2.01 date problem

2008-07-29 Thread Tim Hoff

Yes, but what Matt and Gordon are saying is if you're going to create a
date like this (adjust, instead of construct all at once), you may run
into a leap year issue.

var dtTest:Date = new Date - dtTest.toDateString()=Tue Jul 29 2008
dtTest.fullYear = 1987 - dtTest.toDateString()=Wed Jul 29 1987
dtTest.month = 1 - dtTest.toDateString()=Sun Mar 1 1987 - Here's where
the month rolled because there is no Feb 29th in 1987.
dtTest.date = 3 - dtTest.toDateString()=Tue Mar 3 1987

-TH

--- In flexcoders@yahoogroups.com, "aceoohay" <[EMAIL PROTECTED]> wrote:
>
> What you have shown is that if you use invalid data (February 29th
> of a non leap year) you get bad results. What I showed (February 3rd
> of a non leap year) was that if I use valid data I get invalid
> results.
>
> I truly believe this is a bug.
>
> Paul
> --- In flexcoders@yahoogroups.com, "Gordon Smith" gosmith@
> wrote:
> >
> > A simpler test is
> >
> >
> >
> > var d:Date = new Date(1987, 1, 29);
> > trace(d);
> >
> >
> >
> > This traces "Sun Mar 1 00:00:00 GMT-0800 1987", presumably because
> 1987
> > didn't have a February 29. So I doubt waht you're seeing is a bug.
> (I'd
> > have to check the Ecmascript spec to say for sure.) But it means
> that
> > using Date correctly is much trickier than I ever realized!
> >
> >
> >
> > Gordon Smith
> >
> > Adobe Flex SDK Team
> >
> >
> >
> > 
> >
> > From: flexcoders@yahoogroups.com
> [mailto:[EMAIL PROTECTED] On
> > Behalf Of Matt Chotin
> > Sent: Tuesday, July 29, 2008 2:31 PM
> > To: flexcoders@yahoogroups.com
> > Subject: Re: [flexcoders] Re: Flex 2.01 date problem
> >
> >
> >
> > Try setting the date before you set the month? I think setting the
> month
> > while the current day is later than 28 is going to roll the month
> on you
> > potentially? Just by reording that I got it to work. When I tried
> to set
> > the Date's time to 0 to avoid it using the current date that
> didn't seem
> > to fix things...
> >
> > It does feel like an odd error though. Might be worth filing a
> Flash
> > Player bug at http://bugs.adobe.com/jira.
> 
> > Though would be good to test JavaScript to see if it behaves the
> same.
> >
> > Matt
> >
> > On 7/29/08 2:14 PM, "aceoohay" pauls@
> >  > wrote:
> >
> > Just as a test I used the following;
> >
> > dtTest = new Date(1987,1,3,0,0,0,0);
> >
> > This returned;
> >
> > dtTest.toDateString()=Tue Feb 3 1987
> >
> > which is what I expected. I am so confused.
> >
> > Any ideas?
> >
> > Paul
> >
> > --- In flexcoders@yahoogroups.com  40yahoogroups.com>
> >  , "aceoohay"  wrote:
> > >
> > > The following code yields unexpected results on a date;
> > >
> > > var dtTest:Date = new Date;
> > > dtTest.fullYear = 1987;
> > > dtTest.month = 1;
> > > dtTest.date = 3;
> > > trace('dtTest.toDateString()=' +
> > > dtTest.toDateString());
> > >
> > > The result is;
> > >
> > > dtTest.toDateString()=Tue Mar 3 1987
> > >
> > > It is my understanding that this should be February not March.
> > What am
> > > I doing wrong? or is there a bug in the Date object?
> > >
> > > Paul
> > >
> >
>




[flexcoders] Custom Context Menu in flex app

2008-07-29 Thread vipinck
I am trying to add a custom context menu in my flex app. I am writing
below code in a method which i am calling on applicationComplete event
of the main application.

//
customMenu = new ContextMenu();
var saveItem:ContextMenuItem = new
ContextMenuItem("Save",true,true,true);
saveItem.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT,
doSaveCommand);
customMenu.hideBuiltInItems();
customMenu.customItems.push(saveItem);
Application.application.contextMenu = customMenu;

//

I am able to hide the default menu items when using the
customMenu.hideBuiltInItems(); code, but the custom 'Save' item is not
getting added.

What could be wrong?

Thnx
Vipin 



[flexcoders] Re: Flex 2.01 date problem

2008-07-29 Thread aceoohay
What you have shown is that if you use invalid data (February 29th 
of a non leap year) you get bad results. What I showed (February 3rd 
of a non leap year) was that if I use valid data I get invalid 
results.

I truly believe this is a bug.

Paul
--- In flexcoders@yahoogroups.com, "Gordon Smith" <[EMAIL PROTECTED]> 
wrote:
>
> A simpler test is
> 
>  
> 
> var d:Date = new Date(1987, 1, 29);
> trace(d);
> 
>  
> 
> This traces "Sun Mar 1 00:00:00 GMT-0800 1987", presumably because 
1987
> didn't have a February 29. So I doubt waht you're seeing is a bug. 
(I'd
> have to check the Ecmascript spec to say for sure.) But it means 
that
> using Date correctly is much trickier than I ever realized!
> 
>  
> 
> Gordon Smith
> 
> Adobe Flex SDK Team 
> 
>  
> 
> 
> 
> From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On
> Behalf Of Matt Chotin
> Sent: Tuesday, July 29, 2008 2:31 PM
> To: flexcoders@yahoogroups.com
> Subject: Re: [flexcoders] Re: Flex 2.01 date problem
> 
>  
> 
> Try setting the date before you set the month? I think setting the 
month
> while the current day is later than 28 is going to roll the month 
on you
> potentially? Just by reording that I got it to work. When I tried 
to set
> the Date's time to 0 to avoid it using the current date that 
didn't seem
> to fix things...
> 
> It does feel like an odd error though. Might be worth filing a 
Flash
> Player bug at http://bugs.adobe.com/jira. 

> Though would be good to test JavaScript to see if it behaves the 
same.
> 
> Matt
> 
> On 7/29/08 2:14 PM, "aceoohay" <[EMAIL PROTECTED]
>  > wrote:
> 
> Just as a test I used the following;
> 
> dtTest = new Date(1987,1,3,0,0,0,0);
> 
> This returned;
> 
> dtTest.toDateString()=Tue Feb 3 1987
> 
> which is what I expected. I am so confused.
> 
> Any ideas?
> 
> Paul
> 
> --- In flexcoders@yahoogroups.com 
>  , "aceoohay"  wrote:
> >
> > The following code yields unexpected results on a date;
> >
> > var dtTest:Date = new Date;
> > dtTest.fullYear = 1987;
> > dtTest.month = 1;
> > dtTest.date = 3;
> > trace('dtTest.toDateString()=' +
> > dtTest.toDateString());
> >
> > The result is;
> >
> > dtTest.toDateString()=Tue Mar 3 1987
> >
> > It is my understanding that this should be February not March.
> What am
> > I doing wrong? or is there a bug in the Date object?
> >
> > Paul
> >
>




RE: [flexcoders] Re: Flex 2.01 date problem

2008-07-29 Thread Gordon Smith
A simpler test is

 

var d:Date = new Date(1987, 1, 29);
trace(d);

 

This traces "Sun Mar 1 00:00:00 GMT-0800 1987", presumably because 1987
didn't have a February 29. So I doubt waht you're seeing is a bug. (I'd
have to check the Ecmascript spec to say for sure.) But it means that
using Date correctly is much trickier than I ever realized!

 

Gordon Smith

Adobe Flex SDK Team 

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Matt Chotin
Sent: Tuesday, July 29, 2008 2:31 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Re: Flex 2.01 date problem

 

Try setting the date before you set the month? I think setting the month
while the current day is later than 28 is going to roll the month on you
potentially? Just by reording that I got it to work. When I tried to set
the Date's time to 0 to avoid it using the current date that didn't seem
to fix things...

It does feel like an odd error though. Might be worth filing a Flash
Player bug at http://bugs.adobe.com/jira. 
Though would be good to test JavaScript to see if it behaves the same.

Matt

On 7/29/08 2:14 PM, "aceoohay" <[EMAIL PROTECTED]
 > wrote:

Just as a test I used the following;

dtTest = new Date(1987,1,3,0,0,0,0);

This returned;

dtTest.toDateString()=Tue Feb 3 1987

which is what I expected. I am so confused.

Any ideas?

Paul

--- In flexcoders@yahoogroups.com 
 , "aceoohay" <[EMAIL PROTECTED]> wrote:
>
> The following code yields unexpected results on a date;
>
> var dtTest:Date = new Date;
> dtTest.fullYear = 1987;
> dtTest.month = 1;
> dtTest.date = 3;
> trace('dtTest.toDateString()=' +
> dtTest.toDateString());
>
> The result is;
>
> dtTest.toDateString()=Tue Mar 3 1987
>
> It is my understanding that this should be February not March.
What am
> I doing wrong? or is there a bug in the Date object?
>
> Paul
>

 



Re: [flexcoders] Re: Flex 2.01 date problem

2008-07-29 Thread Matt Chotin
Try setting the date before you set the month?  I think setting the month while 
the current day is later than 28 is going to roll the month on you potentially? 
 Just by reording that I got it to work.  When I tried to set the Date's time 
to 0 to avoid it using the current date that didn't seem to fix things...

It does feel like an odd error though.  Might be worth filing a Flash Player 
bug at http://bugs.adobe.com/jira.  Though would be good to test JavaScript to 
see if it behaves the same.

Matt


On 7/29/08 2:14 PM, "aceoohay" <[EMAIL PROTECTED]> wrote:




Just as a test I used the following;

dtTest = new Date(1987,1,3,0,0,0,0);

This returned;

dtTest.toDateString()=Tue Feb 3 1987

which is what I expected. I am so confused.

Any ideas?

Paul

--- In flexcoders@yahoogroups.com  , 
"aceoohay" <[EMAIL PROTECTED]> wrote:
>
> The following code yields unexpected results on a date;
>
> var dtTest:Date = new Date;
> dtTest.fullYear = 1987;
> dtTest.month = 1;
> dtTest.date = 3;
> trace('dtTest.toDateString()=' +
> dtTest.toDateString());
>
> The result is;
>
> dtTest.toDateString()=Tue Mar 3 1987
>
> It is my understanding that this should be February not March.
What am
> I doing wrong? or is there a bug in the Date object?
>
> Paul
>





[flexcoders] Re: how to get the y position of item in list

2008-07-29 Thread Tim Hoff

Ok, no worries.  Take 2:

import mx.controls.listClasses.IListItemRenderer;

private function scrollToListItem( index : Number )
{
  myList.scrollToIndex(index);
  myList.selectedIndex = index;



  var itemRenderer:IListItemRenderer =
myList.indexToItemRenderer(index);



  var pt:Point = new Point(itemRenderer.x, itemRenderer.y);
  pt = itemRenderer.localToGlobal(pt);
  Alert.show(pt.y.toString());
}





-TH

--- In flexcoders@yahoogroups.com, "blc187" <[EMAIL PROTECTED]> wrote:
>
> In order to get that I would have to click on the item.
> I'm not clicking, I just need to scroll then grab the position of the
> item.
> Thanks for the try, but this is not a viable solution.
>
>
> --- In flexcoders@yahoogroups.com, "Tim Hoff" TimHoff@ wrote:
> >
> >
> > Here's one way. If you're scrolling to the index and setting the
> > currentItem, you an use this code with the change event:
> >
> > private function onItemClick(event:ListEvent):void
> > {
> > var pt:Point = new Point(event.itemRenderer.x,
> > event.itemRenderer.y);
> > pt = event.currentTarget.localToGlobal(pt);
> > Alert.show(pt.y.toString());
> > }
> >
> > 
> > -TH
> >
> > --- In flexcoders@yahoogroups.com, "blc187"  wrote:
> > >
> > > Is there a way to get the y position of a row in a list or
> datagrid?
> > >
> > > I noticed that list has a protected var rowInfo that holds an
> array of
> > > ListRowInfo objects with x and y properties.
> > > From the list class I could do rowInfo[rowNumber].y but am trying
> to
> > > get the y value from outside the list though...
> > >
> > > Also, rowInfo only holds info for the visible rows.
> > > For example, I have a list with 65 items, 20 of which are shown
> before
> > > the scrollbar shows up.
> > >
> > > I want to get rowInfo[5], fine.
> > > I want to get rowInfo[25] it throws an error.
> > >
> > > So I need to scrollToIndex(25) but then I don't know which entry
> in
> > > rowInfo corresponds to my selected item.
> > >
> >
>




[flexcoders] Getting current URL from iFram

2008-07-29 Thread flexawesome
Hey there,

I have a problem of getting URL address from iFrame,

I am using iFrame to link the Flex main.html ( generated by Flex ), I 
am unable to use the AS to get the parent URL address.

ExternalInterface.call( "window.location.href.toString" );

Do you know how to retrieve the parent URL ( index.html ) from iFrame?

--index.html
| ( uses iFrame to link main.html page )
|
   -main.html
   |
   |
  @embedded Flex file

Thank you





RE: [flexcoders] Re: how to get the y position of item in list

2008-07-29 Thread Tracy Spratt
I am a bit nervous about your question, and why you want to do that.

 

First, do you understand why "... rowInfo[25] it throws an error."?

 

While directly accessing the visual elements of a data-driven control is
sometimes valid, it is more often due to a misunderstanding of the way
those controls work.

 

Now, if you set verticalScrollPosition = 25, then the row you want will
be in the first renderer instance and you could probably figure out the
location from that.

 

Tracy

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of blc187
Sent: Tuesday, July 29, 2008 4:56 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: how to get the y position of item in list

 

In order to get that I would have to click on the item.
I'm not clicking, I just need to scroll then grab the position of the 
item.
Thanks for the try, but this is not a viable solution.

--- In flexcoders@yahoogroups.com 
, "Tim Hoff" <[EMAIL PROTECTED]> wrote:
>
> 
> Here's one way. If you're scrolling to the index and setting the
> currentItem, you an use this code with the change event:
> 
> private function onItemClick(event:ListEvent):void
> {
> var pt:Point = new Point(event.itemRenderer.x,
> event.itemRenderer.y);
> pt = event.currentTarget.localToGlobal(pt);
> Alert.show(pt.y.toString());
> }
> 
> 
> -TH
> 
> --- In flexcoders@yahoogroups.com
 , "blc187"  wrote:
> >
> > Is there a way to get the y position of a row in a list or 
datagrid?
> >
> > I noticed that list has a protected var rowInfo that holds an 
array of
> > ListRowInfo objects with x and y properties.
> > From the list class I could do rowInfo[rowNumber].y but am trying 
to
> > get the y value from outside the list though...
> >
> > Also, rowInfo only holds info for the visible rows.
> > For example, I have a list with 65 items, 20 of which are shown 
before
> > the scrollbar shows up.
> >
> > I want to get rowInfo[5], fine.
> > I want to get rowInfo[25] it throws an error.
> >
> > So I need to scrollToIndex(25) but then I don't know which entry 
in
> > rowInfo corresponds to my selected item.
> >
>

 



[flexcoders] Re: Flex 2.01 date problem

2008-07-29 Thread aceoohay
Just as a test I used the following;

dtTest = new Date(1987,1,3,0,0,0,0);

This returned;

dtTest.toDateString()=Tue Feb 3 1987

which is what I expected. I am so confused.

Any ideas?

Paul

--- In flexcoders@yahoogroups.com, "aceoohay" <[EMAIL PROTECTED]> wrote:
>
> The following code yields unexpected results on a date;
> 
>   var dtTest:Date = new Date;
>   dtTest.fullYear = 1987;
>   dtTest.month = 1;
>   dtTest.date = 3;
>   trace('dtTest.toDateString()=' + 
> dtTest.toDateString());
> 
> The result is;
> 
> dtTest.toDateString()=Tue Mar 3 1987
> 
> It is my understanding that this should be February not March. 
What am 
> I doing wrong? or is there a bug in the Date object?
> 
> Paul
>




Re: [flexcoders] Re: RemoteObject madness

2008-07-29 Thread [p e r c e p t i c o n]
no...but i'm going to try it now...
thanks

percy

On Tue, Jul 29, 2008 at 8:25 AM, valdhor <[EMAIL PROTECTED]> wrote:

>   Have you tried an HTTP proxy application like Charles to see what is
> actually being sent/received over the wire?
>
> --- In flexcoders@yahoogroups.com , "[p e r
> c e p t i c o n]"
>
> <[EMAIL PROTECTED]> wrote:
> >
> > Hello Good People...
> >
> > My application has one RemoteObject that i use to connect to different
> > services...in other words i keep the connection open and just switch the
> > destination and source in order to reuse it.
> > I'm having an issue that i'm not sure is related to using it this
> > way...here's how i'm using it...
> >
> > first i use it to do some authentication...upon successful
> authentication i
> > change the source and destination and call another service...upon
> successful
> > return i again change the source and destination and make another
> call
> >
> > and here's what's happening...
> >
> > the first call (authentication) goes well...
> > the second call goes well, but the third call (called from the
> successful
> > result callback of the second) actually calls the successful result
> callback
> > of the second call i made...
> >
> > can anyone tell me what might be happening here...i've double
> checked that
> > i'm calling the correct callbacks, but wonder if this is because i'm
> > cascading this way...
> >
> >
> > thanks
> >
> > percy
> >
>
>  
>


[flexcoders] Flex 2.01 date problem

2008-07-29 Thread aceoohay
The following code yields unexpected results on a date;

var dtTest:Date = new Date;
dtTest.fullYear = 1987;
dtTest.month = 1;
dtTest.date = 3;
trace('dtTest.toDateString()=' + 
dtTest.toDateString());

The result is;

dtTest.toDateString()=Tue Mar 3 1987

It is my understanding that this should be February not March. What am 
I doing wrong? or is there a bug in the Date object?

Paul



[flexcoders] Re: how to get the y position of item in list

2008-07-29 Thread blc187
In order to get that I would have to click on the item.
I'm not clicking, I just need to scroll then grab the position of the 
item.
Thanks for the try, but this is not a viable solution.


--- In flexcoders@yahoogroups.com, "Tim Hoff" <[EMAIL PROTECTED]> wrote:
>
> 
> Here's one way.   If you're scrolling to the index and setting the
> currentItem, you an use this code with the change event:
> 
> private function onItemClick(event:ListEvent):void
> {
>  var pt:Point = new Point(event.itemRenderer.x,
> event.itemRenderer.y);
>  pt = event.currentTarget.localToGlobal(pt);
>  Alert.show(pt.y.toString());
> }
> 
> 
> -TH
> 
> --- In flexcoders@yahoogroups.com, "blc187"  wrote:
> >
> > Is there a way to get the y position of a row in a list or 
datagrid?
> >
> > I noticed that list has a protected var rowInfo that holds an 
array of
> > ListRowInfo objects with x and y properties.
> > From the list class I could do rowInfo[rowNumber].y but am trying 
to
> > get the y value from outside the list though...
> >
> > Also, rowInfo only holds info for the visible rows.
> > For example, I have a list with 65 items, 20 of which are shown 
before
> > the scrollbar shows up.
> >
> > I want to get rowInfo[5], fine.
> > I want to get rowInfo[25] it throws an error.
> >
> > So I need to scrollToIndex(25) but then I don't know which entry 
in
> > rowInfo corresponds to my selected item.
> >
>




Re: [flexcoders] MouseEvent's not firing

2008-07-29 Thread Patrick J. Jankun

Dear Alex,

I just realised that the problem is actually cause of casting an class  
from an loaded .swf,
but this .swf is actually an flash9 swf's, but it's loaded from an  
different domain then the root

.swf.. hmm strange, i didnt knew that :|

I'm using the Bulk-Loader class to load some assets needed to built my  
Gui, and then i initialize
those loaded objects as classes, and then i generate the gui based on  
that classes, so the problem
is that i load the .swf from an different domain then the root .swf, i  
actually upped the assets movie
only for testing, can you give me some advice how to make this the  
right way?


thanks for your answer!
Patrick


On Jul 29, 2008, at 10:44 PM, Alex Harui wrote:



SWFs loaded from a different domain or SWFs built for Player 8 do  
not dispatch mouse events.




From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED]  
On Behalf Of Patrick J. Jankun

Sent: Tuesday, July 29, 2008 11:50 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] MouseEvent's not firing



Hi Everyone,



I got a strange problem which i can't really understand,

i loaded an .swf through the loader, initialised it as an movieclip,  
then


initialised objects in it's library as classes to generate some  
navigation items,


put those itmes in an holder, added that holder to stage. it looks  
all nice and


how it's suppose to look like.



But, when i add an MouseEvent Listener to the holder object, those  
mouseevents


are never fired (?!?) and i clearly don't know why, since this is  
the first time i


run into such problem, can anyone help me out?



navHolder = new Sprite;

navHolder.addEventListener(MouseEvent.MOUSE_OVER, navOnMouseOver);

navHolder.addEventListener(MouseEvent.MOUSE_OUT, navOnMouseOut);

navHolder.addEventListener(MouseEvent.CLICK, navOnMouseClick);

addChild(navHolder);



this code should work out of the box, but it does not :|

and i can't trace the issue, if i put the eventlisteners directly

on stage, the same events are fired on mouse actions..



any tips would be great,



chee! rs,

Patrick







RE: [flexcomponents] RE: [flexcoders] Re: Measurement and template component

2008-07-29 Thread Alex Harui
You know that any indenting you do in the hierarchy doesn't come through
email, right?  The whole list is flat.

 

If a measure() method does not get called then either nobody called
invalidateSize() on it (or caused it to be called via some deeper
invalidation), or it has fixed width/height and doesn't need to be
measured.

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Richard Rodseth
Sent: Tuesday, July 29, 2008 11:47 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcomponents] RE: [flexcoders] Re: Measurement and
template component

 

Actually, I take it back. Only the pseudo-module names are determined
in the service layer - instantiation occurs in an observer. Still,
tI'm concerned about the messed-up parentApplication.

On Tue, Jul 29, 2008 at 11:33 AM, Richard Rodseth <[EMAIL PROTECTED]
 > wrote:
> Good suggestion. For good measure (groan) I added a few overrides of
> measure() that call super, that I could set breakpoints in.
> Recall that the hierarchy is like this:
>
> TiledCanvas
> PodChrome
> ReportModuleA (not a real module, just a VBox)
> ReportChrome
> ReportA
> Grid
>
> I notice that ReportModuleA.measure() does not get called. I also
> noticed in the debugger that ReportModuleA.parentApplication is not
> set (the debugger gives a 1009 error) when you select that property).
> Seems suspect, doesn't it?
>
> ReportModuleA and PodChrome are instantiated in ActionScript, and
> ReportModuleA is actually instantiated in the service layer via a
> static method in its MXML file. Then a parent of TiledCanvas observes
> a list of the pseudo-modules, wraps them in chrome and adds them to
> the TiledCanvas. Seemed reasonable at the time.
>
> On Mon, Jul 28, 2008 at 9:46 PM, Alex Harui <[EMAIL PROTECTED]
 > wrote:
>> You'll have to walk through the measure() methods on each container
to see
>> what it is computing and why.
>>
>>
>>
>> 
>>
>> From: flexcoders@yahoogroups.com

[mailto:flexcoders@yahoogroups.com 
] On
>> Behalf Of Richard Rodseth
>> Sent: Monday, July 28, 2008 2:19 PM
>> To: [EMAIL PROTECTED]
 ; flexcoders@yahoogroups.com
 
>> Subject: [flexcoders] Re: Measurement and template component
>>
>>
>>
>> Oops. Meant for flexcoders.
>>
>> On Mon, Jul 28, 2008 at 2:18 PM, Richard Rodseth <[EMAIL PROTECTED]
 > wrote:
>>> Turns out to be unrelated to the fact that ReportChrome is a
template
>>> component (the same thing happens if it's a plain Canvas).
>>> Removing width="100%" height="100%" on ReportChrome results in the
>>> TiledCanvas tiling correctly but then I am forced to set
>>> minWidth/Height on ReportA or its children, or they shrink to
nothing.
>>>
>>> I'm not sure I understand this - I would expect that the measured
>>> values would bubble up regardless, and that the measured
width/height
>>> of a Canvas or subclass thereof (ReportChrome in this case) would be
>>> the maximum of the measured children or the specified container
>>> percentage.
>>>
>>> On Wed, Jul 23, 2008 at 5:18 PM, Richard Rodseth <[EMAIL PROTECTED]
 >
>>> wrote:
 My application has a structure like this, portions of which are
 created dynamically:

 TiledCanvas
 PodChrome(1)
 ReportModuleA
 ReportChrome(1)
 ReportA
 Grid
 PodChrome(2)
 ReportModuleB
 ReportChrome(2)
 ReportB
 Chart
 etc.

 PodChrome and ReportChrome are template components.
 TiledCanvas is functional - when tiling it correctly reflects a
 minWidth/minHeight set way deep (eg. on the Grid). But only if I
omit
 the ReportChrome wrapper. ReportChrome is just a Canvas with two
 states, that does an addChild in init(). I added a call to
 this.invalidateSize() and child.invalidateSize() after the
addChild()
 to no avail. Any ideas what I could be doing wrong?

>>>
>>
>> 
>

 



RE: [flexcoders] MouseEvent's not firing

2008-07-29 Thread Alex Harui
SWFs loaded from a different domain or SWFs built for Player 8 do not
dispatch mouse events.

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Patrick J. Jankun
Sent: Tuesday, July 29, 2008 11:50 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] MouseEvent's not firing

 

Hi Everyone,

 

I got a strange problem which i can't really understand,

i loaded an .swf through the loader, initialised it as an movieclip,
then 

initialised objects in it's library as classes to generate some
navigation items, 

put those itmes in an holder, added that holder to stage. it looks all
nice and 

how it's suppose to look like.

 

But, when i add an MouseEvent Listener to the holder object, those
mouseevents 

are never fired (?!?) and i clearly don't know why, since this is the
first time i 

run into such problem, can anyone help me out?

 

navHolder = new Sprite;

navHolder.addEventListener(MouseEvent.MOUSE_OVER, navOnMouseOver);

navHolder.addEventListener(MouseEvent.MOUSE_OUT, navOnMouseOut);

navHolder.addEventListener(MouseEvent.CLICK, navOnMouseClick);

addChild(navHolder);

 

this code should work out of the box, but it does not :|

and i can't trace the issue, if i put the eventlisteners directly 

on stage, the same events are fired on mouse actions..

 

any tips would be great,

 

chee! rs,

Patrick

 



Re: [flexcoders] MouseEvent's not firing

2008-07-29 Thread Patrick J. Jankun

Hi Dan,

What do you mean by rawChildren?

Here you can see my whole function:

private function initNav() : void {
navHolder = new Sprite;
navHolder.addEventListener(MouseEvent.MOUSE_OVER, navOnMouseOver);
navHolder.addEventListener(MouseEvent.MOUSE_OUT, navOnMouseOut);
navHolder.addEventListener(MouseEvent.CLICK, navOnMouseClick);
navHolder.addEventListener(Event.MOUSE_LEAVE, navOnMouseOut);

for (var i : int = 0;i < navItemsTxt.length;i++) {
var nav_item : MovieClip = new navItem as MovieClip;

nav_item.tf.text = navItemsTxt[i];
nav_item.tf.selectable = false;

nav_item.bg.alpha = .2;

nav_item.y += (nav_item.height + vertGap) * i;

navHolder.addChild(nav_item);
}

navHolder.x = 20;
navHolder.y = stage.stageHeight - navHolder.height - 20;

stage.addEventListener(Event.RESIZE, stageResized);
addChild(navHolder);
}


On Jul 29, 2008, at 10:05 PM, Dan Vega wrote:



Patrick,

Check out rawChildren, this works just fine for me.

private function addUI():void {
var mySprite:Sprite  = new Sprite();
mySprite.graphics.beginFill(0xFF);
mySprite.graphics.drawCircle(30, 30, 30);
 
mySprite.addEventListener(MouseEvent.MOUSE_OVER,onMouseOver);


rawChildren.addChild(mySprite);
}

private function onMouseOver(event:MouseEvent):void {
trace("move over sprite");
}



Thank You
Dan Vega



On Tue, Jul 29, 2008 at 2:50 PM, Patrick J. Jankun <[EMAIL PROTECTED]>  
wrote:


Hi Everyone,

I got a strange problem which i can't really understand,
i loaded an .swf through the loader, initialised it as an movieclip,  
then
initialised objects in it's library as classes to generate some  
navigation items,
put those itmes in an holder, added that holder to stage. it looks  
all nice and

how it's suppose to look like.

But, when i add an MouseEvent Listener to the holder object, those  
mouseevents
are never fired (?!?) and i clearly don't know why, since this is  
the first time i

run into such problem, can anyone help me out?

navHolder = new Sprite;
navHolder.addEventListener(MouseEvent.MOUSE_OVER, navOnMouseOver);
navHolder.addEventListener(MouseEvent.MOUSE_OUT, navOnMouseOut);
navHolder.addEventListener(MouseEvent.CLICK, navOnMouseClick);
addChild(navHolder);

this code should work out of the box, but it does not :|
and i can't trace the issue, if i put the eventlisteners directly
on stage, the same events are fired on mouse actions..

any tips would be great,

cheers,
Patrick







[flexcoders] Re: Flex 3 MovieClip Move Effect

2008-07-29 Thread Shaq
i have solved this problem by adding effects to the UIComponent
(bPUic).  This works great.

--- In flexcoders@yahoogroups.com, "Shaq" <[EMAIL PROTECTED]> wrote:
>
> I have a movie clip wrapped in UIComponent. What I would like to do is
> move the move from one side of the form to the other using the Move
> effect.
> 
> I can't seem to get this working.  Some code excerpts are below.  Any
> help would be greatly appreciated.
> 
> bpMovie = new MovieClip();
> bpUic = new UIComponent();
> bpUic.addChild(bpMovie);
> 
> private function applyPhaseCancellation():void
> {
>   moveBpMovie.end();
>   moveBpMovie.yTo = noiseUic.y;
>   moveBpMovie.play();
> 
>   //bpMovie.y = noiseMovie.y;
> }
>   
> 
> 
>




[flexcoders] Re: how to get the y position of item in list

2008-07-29 Thread Tim Hoff

Here's one way.   If you're scrolling to the index and setting the
currentItem, you an use this code with the change event:

private function onItemClick(event:ListEvent):void
{
 var pt:Point = new Point(event.itemRenderer.x,
event.itemRenderer.y);
 pt = event.currentTarget.localToGlobal(pt);
 Alert.show(pt.y.toString());
}


-TH

--- In flexcoders@yahoogroups.com, "blc187" <[EMAIL PROTECTED]> wrote:
>
> Is there a way to get the y position of a row in a list or datagrid?
>
> I noticed that list has a protected var rowInfo that holds an array of
> ListRowInfo objects with x and y properties.
> From the list class I could do rowInfo[rowNumber].y but am trying to
> get the y value from outside the list though...
>
> Also, rowInfo only holds info for the visible rows.
> For example, I have a list with 65 items, 20 of which are shown before
> the scrollbar shows up.
>
> I want to get rowInfo[5], fine.
> I want to get rowInfo[25] it throws an error.
>
> So I need to scrollToIndex(25) but then I don't know which entry in
> rowInfo corresponds to my selected item.
>



RE: [flexcoders] Re: How long to build a Flex app....

2008-07-29 Thread Gordon Smith
> if you're like me, and you're in the 20% of cases

> the Flex developers didn't plan for 90% of the time

 

Amy, do you think that your use cases are simply different from those of
most Flex developers? Or do you think that the Flex framework is failing
to anticipate the use cases of most Flex developers? If it's the latter,
we need to try to do a better job with Gumbo and we need folks to file
enhancement requests to help us.

 

Gordon Smith

Adobe Flex SDK Team

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Amy
Sent: Tuesday, July 29, 2008 7:13 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: How long to build a Flex app

 

--- In flexcoders@yahoogroups.com 
, Alan <[EMAIL PROTECTED]> wrote:
>
> I know this is a pretty broad question...
> 
> I'm new to Flex, and having fun with it, but I'd like to get an idea 
> how long these things take to make.
> 
> Instead of me trying to pitch a hypothetical situation, maybe anyone 
> interested in answering could  describe an app they 
made 
> and how long it took and maybe even some juicy gossip about crazy 
> clients.

Here's how I estimate time in Flex.

I take how long I think it will take and multiply that by 3. Usually, 
I will then only be 50% of how long it actually took.

The issue with Flex is that you have to pull together a ton of concepts 
that, even if you understand them in other venues, don't quite work 
that way in Flex. So you need to figure in a _lot_ of research time to 
understand what is going on. Then, even if you _do_ your homework, 
you'll find that quite a few features don't work the way that a 
reasonable person's interpretation of the docs suggest they would.

Finally, if you're like me, and you're in the 20% of cases the Flex 
developers didn't plan for 90% of the time, be prepared to rewrite or 
at least extend virtually everything before you can use it :-).

HTH;

Amy

 



[flexcoders] how to get the y position of item in list

2008-07-29 Thread blc187
Is there a way to get the y position of a row in a list or datagrid?

I noticed that list has a protected var rowInfo that holds an array of 
ListRowInfo objects with x and y properties.
>From the list class I could do rowInfo[rowNumber].y but am trying to 
get the y value from outside the list though...

Also, rowInfo only holds info for the visible rows.
For example, I have a list with 65 items, 20 of which are shown before 
the scrollbar shows up.

I want to get rowInfo[5], fine.
I want to get rowInfo[25] it throws an error.

So I need to scrollToIndex(25) but then I don't know which entry in 
rowInfo corresponds to my selected item.





Re: [flexcoders] MouseEvent's not firing

2008-07-29 Thread Dan Vega
Patrick,

Check out rawChildren, this works just fine for me.

*private function addUI():void {
var mySprite:Sprite  = new Sprite();
mySprite.graphics.beginFill(0xFF);
mySprite.graphics.drawCircle(30, 30, 30);

mySprite.addEventListener(MouseEvent.MOUSE_OVER,onMouseOver);

rawChildren.addChild(mySprite);
}

private function onMouseOver(event:MouseEvent):void {
trace("move over sprite");
}*



Thank You
Dan Vega



On Tue, Jul 29, 2008 at 2:50 PM, Patrick J. Jankun <[EMAIL PROTECTED]> wrote:

>   Hi Everyone,
> I got a strange problem which i can't really understand,
> i loaded an .swf through the loader, initialised it as an movieclip, then
> initialised objects in it's library as classes to generate some navigation
> items,
> put those itmes in an holder, added that holder to stage. it looks all nice
> and
> how it's suppose to look like.
>
> But, when i add an MouseEvent Listener to the holder object, those
> mouseevents
> are never fired (?!?) and i clearly don't know why, since this is the first
> time i
> run into such problem, can anyone help me out?
>
> navHolder = new Sprite;
> navHolder.addEventListener(MouseEvent.MOUSE_OVER, navOnMouseOver);
> navHolder.addEventListener(MouseEvent.MOUSE_OUT, navOnMouseOut);
> navHolder.addEventListener(MouseEvent.CLICK, navOnMouseClick);
> addChild(navHolder);
>
> this code should work out of the box, but it does not :|
> and i can't trace the issue, if i put the eventlisteners directly
> on stage, the same events are fired on mouse actions..
>
> any tips would be great,
>
> cheers,
> Patrick
>  
>


[flexcoders] Re: Free Flex Gauge Component

2008-07-29 Thread Tim Hoff

Very cool Tom, thanks.

-TH

--- In flexcoders@yahoogroups.com, "twgonzalez" <[EMAIL PROTECTED]> wrote:
>
> --- In flexcoders@yahoogroups.com, "twgonzalez" tgonzalez@ wrote:
> Update v.04 released New features: Alert Levels Log Scale BounceEffect
> on/off More accurate tick marks You can see it here
>
 v04.html>  .
>





[flexcoders] Re: flex 2/3 charting questions

2008-07-29 Thread Tim Hoff

As a related note, if you're automating a flex3 build (mxmlc) with
charts, using ant, you may want to to include the following files into
the project.   Otherwise, there will be compile errors; if the machine
doesn't have the pro version installed.

/libs/datavisualization.swc (add library path)
/locale/en_US/charts.properties

-TH

--- In flexcoders@yahoogroups.com, Tom Chiverton <[EMAIL PROTECTED]>
wrote:
>
> On Tuesday 29 Jul 2008, Maciek wrote:
> > We need to build a Flex 2 project that uses Flex Charting. Is it
> > possible to download Flex Charting 2?
>
> I think it's included in the SDK, but watermarked. Could be wrong.
>
> > seem to point to FlexBuilder 3. I know that FlexBuilder 3 includes
the
> > Flex 2 SDK: with the pro version (that includes Flex 3 Charting), is
it
> > possible to build a project with the Flex 2 SDK but using Flex 3
> > Charting?
>
> No.
>
> > from places like Amazon, but this is really sort of a one-time
> > build--the watermarks are not important and shortly afterwards we're
> > planning to move to Flex 3.
>
> Just use the Flex 2 SDK then.
>
> --
> Tom Chiverton
>
> 
>
> This email is sent for and on behalf of Halliwells LLP.
>
> Halliwells LLP is a limited liability partnership registered in
England and Wales under registered number OC307980 whose registered
office address is at Halliwells LLP, 3 Hardman Square, Spinningfields,
Manchester, M3 3EB. A list of members is available for inspection at the
registered office. Any reference to a partner in relation to Halliwells
LLP means a member of Halliwells LLP. Regulated by The Solicitors
Regulation Authority.
>
> CONFIDENTIALITY
>
> This email is intended only for the use of the addressee named above
and may be confidential or legally privileged. If you are not the
addressee you must not read it and must not use any information
contained in nor copy it nor inform any person other than Halliwells LLP
or the addressee of its existence or contents. If you have received this
email in error please delete it and notify Halliwells LLP IT Department
on 0870 365 2500.
>
> For more information about Halliwells LLP visit www.halliwells.com.
>





Re: [flexcoders] Flex (w/ LCDS or BlazeDS) Hosting options...

2008-07-29 Thread Ryan Gravener
Slicehost, full control for $20 a month

http://www.slicehost.com


On Tue, Jul 29, 2008 at 2:48 PM, henryhokinhang <[EMAIL PROTECTED]> wrote:

>   Where do you host your Flex app that requires LiveCycle DS or Blaze DS?
>
> When a hosting company claims they support CF8, does it usually
> include the embed LCDS?
>
> Is dedicated server the only way to go?
>
> Is RMTP channel practical for flex on Internet? or just for Intranet?
>
> Thank you.
>
>  
>



-- 
Ryan Gravener
http://twitter.com/ryangravener


[flexcoders] Update Pie Chart

2008-07-29 Thread nofearalpha
I am looking for a way for the pie chart to update each time the 
custom component is viewed. Right now the way I have it, the chart 
does not visually appear on the screen. If I use creationcomplete 
event to fire it off, then it works, but will never update. 
Suggestions? Here's some of my code:

http://www.adobe.com/2006/mxml";
xmlns:vd="com.cust.app.view.dashboard.*"
show="usagePie_show()">











[flexcoders] MouseEvent's not firing

2008-07-29 Thread Patrick J. Jankun

Hi Everyone,

I got a strange problem which i can't really understand,
i loaded an .swf through the loader, initialised it as an movieclip,  
then
initialised objects in it's library as classes to generate some  
navigation items,
put those itmes in an holder, added that holder to stage. it looks all  
nice and

how it's suppose to look like.

But, when i add an MouseEvent Listener to the holder object, those  
mouseevents
are never fired (?!?) and i clearly don't know why, since this is the  
first time i

run into such problem, can anyone help me out?

navHolder = new Sprite;
navHolder.addEventListener(MouseEvent.MOUSE_OVER, navOnMouseOver);
navHolder.addEventListener(MouseEvent.MOUSE_OUT, navOnMouseOut);
navHolder.addEventListener(MouseEvent.CLICK, navOnMouseClick);
addChild(navHolder);

this code should work out of the box, but it does not :|
and i can't trace the issue, if i put the eventlisteners directly
on stage, the same events are fired on mouse actions..

any tips would be great,

cheers,
Patrick

[flexcoders] Flex (w/ LCDS or BlazeDS) Hosting options...

2008-07-29 Thread henryhokinhang
Where do you host your Flex app that requires LiveCycle DS or Blaze DS?

When a hosting company claims they support CF8, does it usually
include the embed LCDS?

Is dedicated server the only way to go?

Is RMTP channel practical for flex on Internet? or just for Intranet?


Thank you.



[flexcoders] Re: Setting the dataGrid column's font and leaving the header alone?

2008-07-29 Thread bredwards358
Thank you, that worked perfectly.

--- In flexcoders@yahoogroups.com, "Alex Harui" <[EMAIL PROTECTED]> wrote:
>
> I think you have to make a custom header renderer that forces its font
> family back to something you want.
> 
>  
> 
> 
> 
> From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
> Behalf Of bredwards358
> Sent: Tuesday, July 29, 2008 11:07 AM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Setting the dataGrid column's font and leaving the
> header alone?
> 
>  
> 
> So, today I found a type128 barcode font which fits the purposes of
> the application we're developing quite nicely. However I've hit a bit
> of a snag. When the font family of a dataGrid column is set, it sets
> both the font of the column's items as well as the column header. This
> would be fine if the font displayed normal letters other than the
> usual Verdana, but when its barcodes...
> 
> Essentially I want to know if it is possible to set the font of the
> column's items separately from the header itself. Is this possible?
>




Re: [flexcomponents] RE: [flexcoders] Re: Measurement and template component

2008-07-29 Thread Richard Rodseth
Actually, I take it back. Only the pseudo-module names are determined
in the service layer - instantiation occurs in an observer. Still,
tI'm concerned about the messed-up parentApplication.

On Tue, Jul 29, 2008 at 11:33 AM, Richard Rodseth <[EMAIL PROTECTED]> wrote:
> Good suggestion. For good measure (groan) I added a few overrides of
> measure() that call super, that I could set breakpoints in.
> Recall that the hierarchy is like this:
>
> TiledCanvas
>  PodChrome
>ReportModuleA (not a real module, just a VBox)
>  ReportChrome
>ReportA
>  Grid
>
> I notice that ReportModuleA.measure() does not get called. I also
> noticed in the debugger that ReportModuleA.parentApplication is not
> set (the debugger gives a 1009 error) when you select that property).
> Seems suspect, doesn't it?
>
> ReportModuleA and PodChrome are instantiated in ActionScript, and
> ReportModuleA is actually instantiated in the service layer via a
> static method in its MXML file. Then a parent of TiledCanvas observes
> a list of the pseudo-modules, wraps them in chrome and adds them to
> the TiledCanvas. Seemed reasonable at the time.
>
> On Mon, Jul 28, 2008 at 9:46 PM, Alex Harui <[EMAIL PROTECTED]> wrote:
>> You'll have to walk through the measure() methods on each container to see
>> what it is computing and why.
>>
>>
>>
>> 
>>
>> From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
>> Behalf Of Richard Rodseth
>> Sent: Monday, July 28, 2008 2:19 PM
>> To: [EMAIL PROTECTED]; flexcoders@yahoogroups.com
>> Subject: [flexcoders] Re: Measurement and template component
>>
>>
>>
>> Oops. Meant for flexcoders.
>>
>> On Mon, Jul 28, 2008 at 2:18 PM, Richard Rodseth <[EMAIL PROTECTED]> wrote:
>>> Turns out to be unrelated to the fact that ReportChrome is a template
>>> component (the same thing happens if it's a plain Canvas).
>>> Removing width="100%" height="100%" on ReportChrome results in the
>>> TiledCanvas tiling correctly but then I am forced to set
>>> minWidth/Height on ReportA or its children, or they shrink to nothing.
>>>
>>> I'm not sure I understand this - I would expect that the measured
>>> values would bubble up regardless, and that the measured width/height
>>> of a Canvas or subclass thereof (ReportChrome in this case) would be
>>> the maximum of the measured children or the specified container
>>> percentage.
>>>
>>> On Wed, Jul 23, 2008 at 5:18 PM, Richard Rodseth <[EMAIL PROTECTED]>
>>> wrote:
 My application has a structure like this, portions of which are
 created dynamically:

 TiledCanvas
 PodChrome(1)
 ReportModuleA
 ReportChrome(1)
 ReportA
 Grid
 PodChrome(2)
 ReportModuleB
 ReportChrome(2)
 ReportB
 Chart
 etc.

 PodChrome and ReportChrome are template components.
 TiledCanvas is functional - when tiling it correctly reflects a
 minWidth/minHeight set way deep (eg. on the Grid). But only if I omit
 the ReportChrome wrapper. ReportChrome is just a Canvas with two
 states, that does an addChild in init(). I added a call to
 this.invalidateSize() and child.invalidateSize() after the addChild()
 to no avail. Any ideas what I could be doing wrong?

>>>
>>
>> 
>


Re: [flexcomponents] RE: [flexcoders] Re: Measurement and template component

2008-07-29 Thread Richard Rodseth
Good suggestion. For good measure (groan) I added a few overrides of
measure() that call super, that I could set breakpoints in.
Recall that the hierarchy is like this:

TiledCanvas
  PodChrome
ReportModuleA (not a real module, just a VBox)
  ReportChrome
ReportA
  Grid

I notice that ReportModuleA.measure() does not get called. I also
noticed in the debugger that ReportModuleA.parentApplication is not
set (the debugger gives a 1009 error) when you select that property).
Seems suspect, doesn't it?

ReportModuleA and PodChrome are instantiated in ActionScript, and
ReportModuleA is actually instantiated in the service layer via a
static method in its MXML file. Then a parent of TiledCanvas observes
a list of the pseudo-modules, wraps them in chrome and adds them to
the TiledCanvas. Seemed reasonable at the time.

On Mon, Jul 28, 2008 at 9:46 PM, Alex Harui <[EMAIL PROTECTED]> wrote:
> You'll have to walk through the measure() methods on each container to see
> what it is computing and why.
>
>
>
> 
>
> From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
> Behalf Of Richard Rodseth
> Sent: Monday, July 28, 2008 2:19 PM
> To: [EMAIL PROTECTED]; flexcoders@yahoogroups.com
> Subject: [flexcoders] Re: Measurement and template component
>
>
>
> Oops. Meant for flexcoders.
>
> On Mon, Jul 28, 2008 at 2:18 PM, Richard Rodseth <[EMAIL PROTECTED]> wrote:
>> Turns out to be unrelated to the fact that ReportChrome is a template
>> component (the same thing happens if it's a plain Canvas).
>> Removing width="100%" height="100%" on ReportChrome results in the
>> TiledCanvas tiling correctly but then I am forced to set
>> minWidth/Height on ReportA or its children, or they shrink to nothing.
>>
>> I'm not sure I understand this - I would expect that the measured
>> values would bubble up regardless, and that the measured width/height
>> of a Canvas or subclass thereof (ReportChrome in this case) would be
>> the maximum of the measured children or the specified container
>> percentage.
>>
>> On Wed, Jul 23, 2008 at 5:18 PM, Richard Rodseth <[EMAIL PROTECTED]>
>> wrote:
>>> My application has a structure like this, portions of which are
>>> created dynamically:
>>>
>>> TiledCanvas
>>> PodChrome(1)
>>> ReportModuleA
>>> ReportChrome(1)
>>> ReportA
>>> Grid
>>> PodChrome(2)
>>> ReportModuleB
>>> ReportChrome(2)
>>> ReportB
>>> Chart
>>> etc.
>>>
>>> PodChrome and ReportChrome are template components.
>>> TiledCanvas is functional - when tiling it correctly reflects a
>>> minWidth/minHeight set way deep (eg. on the Grid). But only if I omit
>>> the ReportChrome wrapper. ReportChrome is just a Canvas with two
>>> states, that does an addChild in init(). I added a call to
>>> this.invalidateSize() and child.invalidateSize() after the addChild()
>>> to no avail. Any ideas what I could be doing wrong?
>>>
>>
>
> 


[flexcoders] Re: Free Flex Gauge Component

2008-07-29 Thread zyzzx00_99
looks a lot like your Degrafa gauge.  We use it at Woodword Governor's
internal toolset:
http://www.brightpointinc.com/FlexDemos/degrafagauge/degrafagaugesample.html




RE: [flexcoders] Re: Custom error handler

2008-07-29 Thread Alex Harui
When an exception is thrown, all functions in the call stack exit
immediately until someone catches the exception.  If nobody catches,
you'll get an RTE dialog in the debugger player.

 

You have to decide where to catch it and how to deal with the fact that
some code probably didn't run because of the exception.

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of markgoldin_2000
Sent: Tuesday, July 29, 2008 9:56 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Custom error handler

 

But in where? Anywhere I expect the error to occur?

--- In flexcoders@yahoogroups.com 
, "Alex Harui" <[EMAIL PROTECTED]> wrote:
>
> Throw it and catch it.
> 
> 
> 
> 
> 
> From: flexcoders@yahoogroups.com 

[mailto:flexcoders@yahoogroups.com 
] On
> Behalf Of markgoldin_2000
> Sent: Tuesday, July 29, 2008 7:05 AM
> To: flexcoders@yahoogroups.com  
> Subject: [flexcoders] Custom error handler
> 
> 
> 
> If I subclass Error class like this:
> public class AppError extends Error
> {
> public function AppError(message:String, errorID:int)
> {
> super(message, errorID);
> }
> }
> do I need to do anything else to get all errors into my custom 
error 
> handler?
> 
> Thanks
>

 



RE: [flexcoders] Setting the dataGrid column's font and leaving the header alone?

2008-07-29 Thread Alex Harui
I think you have to make a custom header renderer that forces its font
family back to something you want.

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of bredwards358
Sent: Tuesday, July 29, 2008 11:07 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Setting the dataGrid column's font and leaving the
header alone?

 

So, today I found a type128 barcode font which fits the purposes of
the application we're developing quite nicely. However I've hit a bit
of a snag. When the font family of a dataGrid column is set, it sets
both the font of the column's items as well as the column header. This
would be fine if the font displayed normal letters other than the
usual Verdana, but when its barcodes...

Essentially I want to know if it is possible to set the font of the
column's items separately from the header itself. Is this possible?

 



RE: [flexcoders] TextArea popup editor in DataGrid

2008-07-29 Thread Alex Harui
focusOutHandler should have called itemRendererContains with your custom
class and that textfield and the owner chain should have gotten from the
textfield to the custom class.  It shouldn't matter what the parent is,
you want it to be the systemManager.  It should be the fifth "if"
statement

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Glenn Jones
Sent: Tuesday, July 29, 2008 9:16 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] TextArea popup editor in DataGrid

 

I trapped in DataGrid.itemEditorFocusOutHandler() - the chain of 'owner'
values for event.relatedObject
does goes back to the grid, but the chain of 'parent' values does not.

The event.relatedObject is type UITTextField  The owner & parent of
UITextField is an instance of TextArea. 
This is the instance managed by PopUpManager. The TextArea.owner =
myCustomClass (the item editor instance), 
but TextArea.parent is an instance of myApp_mx_managers_SystemManager.

I tried calling addChild() with the popup TextArea instance, but it
really didn't lilke that - apparently PopUpManager
likes to parent all of the popups (which makes sense).

Any other suggestions or have I reached a dead-end with this approach?

Thanks for your help,
Glenn

On Mon, Jul 28, 2008 at 11:41 PM, Alex Harui <[EMAIL PROTECTED]
 > wrote:

Walk through the focusOutHandler on DataGrid.  In theory, if the object
getting focus is owned by the itemeditor, it shouldn't try to end the
edit session.

 



From: flexcoders@yahoogroups.com 
[mailto:flexcoders@yahoogroups.com  ]
On Behalf Of Glenn Jones
Sent: Monday, July 28, 2008 3:41 PM
To: flexcoders@yahoogroups.com  
Subject: Re: [flexcoders] TextArea popup editor in DataGrid

 

I've tried using a popup TextArea but I'm having real problems trying to
get it to work as an item editor
within a datagrid.

My business requirements are

- someone can click in the DG cell to start editing. If the cell uses a
TextArea control, they should get popup-like TA that extends across rows
to enter longer blocks of text
- the user can enter data in any text-based editable cell without using
a mouse (but they can use a mouse if they want to)
- someone can tab across a row in the DG; our DG needs to move from one
editable cell to the next (and go to next editable row if they tab out
of the last editable cell in a row)
- the user can use shift-tab to go to previous editable cell
- the user can use ENTER to finish the edit and save the row
- the user can use ESCAPE to cancel the edit

So I've already got all of the keyboard behavior working with a
TextField controls. It also works if I use a simple TextArea as the item
editor (but see if the beginning of the thread for my problem with a
simple TextArea).  

However, when I open the TextArea with a PopUpManager I'm having
problems. My custom item editor is composed of a Canvas:

public class PopUpTextArea extends Canvas 
implements IDropInListItemRenderer, IFocusManagerComponent

On creationComplete, the editor creates a new instance of TextArea, and
uses PopUpManager to open it.

_popup = new TextArea();
_popup.width= this.width;
_popup.height= EDIT_HEIGHT;
_popup.text = this._text;
_popup.owner = this;

PopUpManager.addPopUp(_popup, this, false);
PopUpManager.bringToFront(_popup);

But ...

If I try to programmatically set focus on the popup, the DG crashes.
Apparently, it's getting wrapped around a pole somehow because setting
focus
on the popup triggers an item-edit-end.  If I click in the TA, it either
(A) goes in a little circle - item-edit-end is called because the Canvas
losses focus, so it
closes the TA, but the editedItemPosition doesn't move, so it creates a
new instance of the editor which opens the popup, or (B) it just closes
the item-editor
because the item-editor lost focus

I also tried to capture keystrokes on the Canvas and pass them to the
TA, that didn't work either. But even if it did work, the user still
needs the ability
to use the mouse if they want to.

So is it possible to use a TextArea in a PopUp as an item editor in a
DataGrid?

On Fri, Jul 18, 2008 at 4:42 PM, Alex Harui <[EMAIL PROTECTED]
 > wrote:

Well, you could popup a TextArea like PopUpButton does, but it sounds
like your real goal is to have the TA extend across rows and not be
below the lines.  I assume you don't want the TA to fit within a single
row?

 

How will you handle the area at the bottom of the DG?  If I click the
last row, should the TA extend two rows below the DG?

 



From: flexcoders@yahoogroups.com 
[mailto:flexcoders@yahoogroups.com 

[flexcoders] Setting the dataGrid column's font and leaving the header alone?

2008-07-29 Thread bredwards358
So, today I found a type128 barcode font which fits the purposes of
the application we're developing quite nicely. However I've hit a bit
of a snag. When the font family of a dataGrid column is set, it sets
both the font of the column's items as well as the column header. This
would be fine if the font displayed normal letters other than the
usual Verdana, but when its barcodes...

Essentially I want to know if it is possible to set the font of the
column's items separately from the header itself. Is this possible?



[flexcoders] Need help: Build with remoteObject support

2008-07-29 Thread olol97124
Hello

I am having problems to build the project with LCDS (remoteObject).
The RemoteObject is handled by a Java thread on server. The service is
in .jar which I put under WEB-INF/lib. The system works fine in
non-built release (which I copied those files to server directly, let
server built .swf). After building in Flex builder 3.0, the .swf can't
start and find the service. My question is how to setup project to
include 'messaging channel' support.
  
thanks in advance!



[flexcoders] Re: Free Flex Gauge Component

2008-07-29 Thread twgonzalez
--- In flexcoders@yahoogroups.com, "twgonzalez" <[EMAIL PROTECTED]> wrote: 
Update v.04 released  New features:  Alert Levels Log Scale BounceEffect
on/off More accurate tick marks  You can see it here
  .



Re: [flexcoders] TextArea popup editor in DataGrid

2008-07-29 Thread Glenn Jones
I trapped in DataGrid.itemEditorFocusOutHandler() - the chain of 'owner'
values for event.relatedObject
does goes back to the grid, but the chain of 'parent' values does not.

The event.relatedObject is type UITTextField  The owner & parent of
UITextField is an instance of TextArea.
This is the instance managed by PopUpManager. The TextArea.owner =
myCustomClass (the item editor instance),
but TextArea.parent is an instance of myApp_mx_managers_SystemManager.

I tried calling addChild() with the popup TextArea instance, but it really
didn't lilke that - apparently PopUpManager
likes to parent all of the popups (which makes sense).

Any other suggestions or have I reached a dead-end with this approach?

Thanks for your help,
Glenn

On Mon, Jul 28, 2008 at 11:41 PM, Alex Harui <[EMAIL PROTECTED]> wrote:

>Walk through the focusOutHandler on DataGrid.  In theory, if the object
> getting focus is owned by the itemeditor, it shouldn't try to end the edit
> session.
>
>
>  --
>
> *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
> Behalf Of *Glenn Jones
> *Sent:* Monday, July 28, 2008 3:41 PM
> *To:* flexcoders@yahoogroups.com
> *Subject:* Re: [flexcoders] TextArea popup editor in DataGrid
>
>
>
> I've tried using a popup TextArea but I'm having real problems trying to
> get it to work as an item editor
> within a datagrid.
>
> My business requirements are
>
> - someone can click in the DG cell to start editing. If the cell uses a
> TextArea control, they should get popup-like TA that extends across rows to
> enter longer blocks of text
> - the user can enter data in any text-based editable cell without using a
> mouse (but they can use a mouse if they want to)
> - someone can tab across a row in the DG; our DG needs to move from one
> editable cell to the next (and go to next editable row if they tab out of
> the last editable cell in a row)
> - the user can use shift-tab to go to previous editable cell
> - the user can use ENTER to finish the edit and save the row
> - the user can use ESCAPE to cancel the edit
>
> So I've already got all of the keyboard behavior working with a TextField
> controls. It also works if I use a simple TextArea as the item editor (but
> see if the beginning of the thread for my problem with a simple TextArea).
>
> However, when I open the TextArea with a PopUpManager I'm having problems.
> My custom item editor is composed of a Canvas:
>
> public class PopUpTextArea extends Canvas
> implements IDropInListItemRenderer, IFocusManagerComponent
>
> On creationComplete, the editor creates a new instance of TextArea, and
> uses PopUpManager to open it.
>
> _popup = new TextArea();
> _popup.width= this.width;
> _popup.height= EDIT_HEIGHT;
> _popup.text = this._text;
> _popup.owner = this;
>
> PopUpManager.addPopUp(_popup, this, false);
> PopUpManager.bringToFront(_popup);
>
> But ...
>
> If I try to programmatically set focus on the popup, the DG crashes.
> Apparently, it's getting wrapped around a pole somehow because setting focus
> on the popup triggers an item-edit-end.  If I click in the TA, it either
> (A) goes in a little circle - item-edit-end is called because the Canvas
> losses focus, so it
> closes the TA, but the editedItemPosition doesn't move, so it creates a new
> instance of the editor which opens the popup, or (B) it just closes the
> item-editor
> because the item-editor lost focus
>
> I also tried to capture keystrokes on the Canvas and pass them to the TA,
> that didn't work either. But even if it did work, the user still needs the
> ability
> to use the mouse if they want to.
>
> So is it possible to use a TextArea in a PopUp as an item editor in a
> DataGrid?
>
>  On Fri, Jul 18, 2008 at 4:42 PM, Alex Harui <[EMAIL PROTECTED]> wrote:
>
> Well, you could popup a TextArea like PopUpButton does, but it sounds like
> your real goal is to have the TA extend across rows and not be below the
> lines.  I assume you don't want the TA to fit within a single row?
>
>
>
> How will you handle the area at the bottom of the DG?  If I click the last
> row, should the TA extend two rows below the DG?
>
>
>  --
>
> *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
> Behalf Of *Glenn Jones
> *Sent:* Friday, July 18, 2008 11:17 AM
> *To:* flexcoders@yahoogroups.com
> *Subject:* [flexcoders] TextArea popup editor in DataGrid
>
>
>
> I have a DataGrid where one of the columns is a TextArea control as the
> itemEditor.
>
> When I edit a cell in the column with the TextArea editor, the TextArea
> opens up to a height equivalent to
> three rows of data in the grid. The editor works fine; in fact it's been
> working this way for some time.
>
> But recently, we enabled horizontal and vertical grid lines on the grid.
> When the TextArea editor opens up,
> the datagrid horizontal grid 

[flexcoders] Re: Custom error handler

2008-07-29 Thread markgoldin_2000
But in where? Anywhere I expect the error to occur?


--- In flexcoders@yahoogroups.com, "Alex Harui" <[EMAIL PROTECTED]> wrote:
>
> Throw it and catch it.
> 
>  
> 
> 
> 
> From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On
> Behalf Of markgoldin_2000
> Sent: Tuesday, July 29, 2008 7:05 AM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Custom error handler
> 
>  
> 
> If I subclass Error class like this:
> public class AppError extends Error
> {
> public function AppError(message:String, errorID:int)
> {
> super(message, errorID);
> }
> }
> do I need to do anything else to get all errors into my custom 
error 
> handler?
> 
> Thanks
>




[flexcoders] pass extra params to callback?

2008-07-29 Thread chigwell23


This callback takes a LineSeriesSegment I think. What I want to do is
pass more information about the chart to it, as in

lineSegmentRenderer="myLineRenderer('mySeries','var1', 'var2')" 

and I expected this error:

Initializer for 'lineSegmentRenderer': cannot parse value of type
mx.core.IFactory from text 'myLineRenderer('mySeries')'.

Is there a way of doing this? TIA,

Mic.



RE: [flexcoders] Custom error handler

2008-07-29 Thread Alex Harui
Throw it and catch it.

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of markgoldin_2000
Sent: Tuesday, July 29, 2008 7:05 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Custom error handler

 

If I subclass Error class like this:
public class AppError extends Error
{
public function AppError(message:String, errorID:int)
{
super(message, errorID);
}
}
do I need to do anything else to get all errors into my custom error 
handler?

Thanks

 



RE: [flexcoders] Ico loader from url

2008-07-29 Thread Alex Harui
SuperImage from quietlyscheming.com

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of toelen
Sent: Tuesday, July 29, 2008 7:41 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Ico loader from url

 

Hi,

I need to display a table with icons (windows ico files) which are
only known at runtime (by name, I can create the full url using the
name), and a lot of rows will have identical icons. There are over 200
icon files and some of them will be created at runtime by another
process, so I can not embed them in my flex project.
Is there a way to download ico files from an url and put them in a
global hashmap somewhere so I don't need to download them again? I
looked at IconLoader but I can't get it to work in Flex3.

Regards,
Leen Toelen

 



[flexcoders] Re: mxml components

2008-07-29 Thread Michael VanDaniker
The import statement does not create instances.  It just makes a class
available to another class so it can use its methods and create
instances of it.  You don't need an import statement if the class you
want to import is in the same package as the class you are referencing
it from. You can import an entire package by using the wildcard
character (import mx.controls.*).

You create instances by using the new operator. When you declare an
object in MXML that tag is compiled into a block of Actionscript that
contains the new operator.

--- In flexcoders@yahoogroups.com, "Scott" <[EMAIL PROTECTED]> wrote:
>
> The "import ;" is what creates the instance?  So in other
words, if I use the import  in each of my other files,
each one is creating another instance of the ?
> 
> 
> 
> From: flexcoders@yahoogroups.com on behalf of Michael VanDaniker
> Sent: Tue 7/29/2008 10:30 AM
> To: flexcoders@yahoogroups.com
> Subject: {Disarmed} Re: {Disarmed} RE: [flexcoders] mxml components
> 
> 
> 
> > Are these the same instance or unique instances with in each of the
> > class instances themselves (mainclass/class3)?
> > 
> > 
> > 
> > MainClass.mxml:
> > 
> > 
> > 
> > 
> > 
> > 

RE: [flexcoders] mxml components

2008-07-29 Thread Scott
The "import ;" is what creates the instance?  So in other words, if I 
use the import  in each of my other files, each one is creating 
another instance of the ?



From: flexcoders@yahoogroups.com on behalf of Michael VanDaniker
Sent: Tue 7/29/2008 10:30 AM
To: flexcoders@yahoogroups.com
Subject: {Disarmed} Re: {Disarmed} RE: [flexcoders] mxml components



> Are these the same instance or unique instances with in each of the
> class instances themselves (mainclass/class3)?
> 
> 
> 
> MainClass.mxml:
> 
> 
> 
> 
> 
> 

[flexcoders] Re: Please help a newbie :) - ArrayCollection

2008-07-29 Thread cox.blair
I'm starting to think all I need to do is post a message here and the
answer instantly makes itself known.

Sorry that I wasn't very descriptive. This is what I was looking for;

private function getListLabel(item:Object):String
{
return item.Sample_Point_Name + " (" +
item.Test_Kit_Used + 
")";
}

Thanks.

--- In flexcoders@yahoogroups.com, "Amy" <[EMAIL PROTECTED]> wrote:

> 
> Without more information, it's impossible to answer your question.
>




[flexcoders] Re: Please help a newbie :) - ArrayCollection

2008-07-29 Thread Amy
--- In flexcoders@yahoogroups.com, "cox.blair" <[EMAIL PROTECTED]> wrote:
>
> Hi, I'm sure this is incredibly simple, however I'm having trouble
> figuring it out.
> 
> I have a php script which connects to a db and returns standard xml.
> What I want to do is choose which children from the repeating 
elements
> to use.
> 
> Found this example and it works:
> 
> 
>  text="{pointRepeater.currentItem.Sample_Point_Name}"/>
>  
> 
> My ArrayCollection is called 'samplepoint'.

What's in it?

> XML is response.data.row

How does that relate to your ArrayCollection, and what is in it?

> 
> So lets say I have a combobox that I would like to specify which of
> the child elements of my xml data I wish to use - how would I do 
this?
> 
> I've tried dataProvider="{samplepoint.Sample_Point_Name}"
> 
> The only way I could come close was to use
> labelField="Sample_Point_Name", but this doesn't do much for me, 
since
> I need to specify a data value.
> 
> I have looked to great length, I must be missing something. Thank 
you.

Without more information, it's impossible to answer your question.



[flexcoders] Please help a newbie :) - ArrayCollection

2008-07-29 Thread cox.blair
Hi, I'm sure this is incredibly simple, however I'm having trouble
figuring it out.

I have a php script which connects to a db and returns standard xml.
What I want to do is choose which children from the repeating elements
to use.

Found this example and it works:



 

My ArrayCollection is called 'samplepoint'.
XML is response.data.row

So lets say I have a combobox that I would like to specify which of
the child elements of my xml data I wish to use - how would I do this?

I've tried dataProvider="{samplepoint.Sample_Point_Name}"

The only way I could come close was to use
labelField="Sample_Point_Name", but this doesn't do much for me, since
I need to specify a data value.

I have looked to great length, I must be missing something. Thank you.



Re: [flexcoders] Re: How long to build a Flex app....

2008-07-29 Thread Nik Derewianka
On 30/07/2008, at 12:52 AM, Jason B wrote:
> It really depends on the flex coder since each coder could take longer
> depending on thier understanding of the project and database functions
> etc...and whether or not they are building the middleware code too?
> We have an app with about 30 tabs and over 600 objects total on the
> flex code, and about 1400 lines in mxml and 3500 lines in action  
> script.
> It took me about 1 month and im the only developer and im also
> developing the middleware and database writes with php too.
> The more you do the more you learn and faster too.
>
> --- In flexcoders@yahoogroups.com, Alan <[EMAIL PROTECTED]> wrote:
> > I'm new to Flex, and having fun with it, but I'd like to get an idea
> > how long these things take to make.
>

It is also highly dependant on the scope of the project.  For instance  
we are building an online kids portal with 4 mini games, avatar  
builder, news system, user/accnt management, educational animations,  
custom AS components, skins etc and we have 4 designers and 1  
programmer (me) going at it pretty solidly for 2.5 months.  This is  
also our first Flex project so learning curves are all over the place  
along with banging into things that Flex doesn't seem too crash hot  
with - but also discovering things that really make Flex shine over  
Flash.

Regards,
Nik


Re: {Disarmed} RE: [flexcoders] mxml components

2008-07-29 Thread Michael VanDaniker
> Are these the same instance or unique instances with in each of the
> class instances themselves (mainclass/class3)?
> 
>  
> 
> MainClass.mxml:
> 
>  
> 
> 
> 
>  

[flexcoders] Re: RemoteObject madness

2008-07-29 Thread valdhor
Have you tried an HTTP proxy application like Charles to see what is
actually being sent/received over the wire?



--- In flexcoders@yahoogroups.com, "[p e r c e p t i c o n]"
<[EMAIL PROTECTED]> wrote:
>
> Hello Good People...
> 
> My application has one RemoteObject that i use to connect to different
> services...in other words i keep the connection open and just switch the
> destination and source in order to reuse it.
> I'm having an issue that i'm not sure is related to using it this
> way...here's how i'm using it...
> 
> first i use it to do some authentication...upon successful
authentication i
> change the source and destination and call another service...upon
successful
> return i again change the source and destination and  make another
call
> 
> and here's what's happening...
> 
> the first call (authentication) goes well...
> the second call goes well, but the third call (called from the
successful
> result callback of the second) actually calls the successful result
callback
> of the second call i made...
> 
> can anyone tell me what might be happening here...i've double
checked that
> i'm calling the correct callbacks, but wonder if this is because i'm
> cascading this way...
> 
> 
> thanks
> 
> percy
>




RE: [flexcoders] mxml components

2008-07-29 Thread Scott
 
My spam filter needs to be re-tuned to get rid of the {disarmed}.  I'm going to 
resend this so it gets on the thread vs. starting a new one.  My apologies for 
this.
-



That helps a little; thanks.

 

Based on how you are describing the instances, my issue may be with the 
debugger and variable scope within the debugger.

 

I'm talking about my instances instead of flex instances in my example.  I'm 
trying to figure out how code is initialized to understand where I should 
separate code into its own class.

 

My first piece of code is a login routine that authenticates against a remote 
object (coldfusion).

 

I've got the class structured like this:

 

Login.mxml

|

|---loginform.mxml

|

|---registrationform.mxml

|

|---forgotpassword.mxml

 

The login.mxml class states call each of the other form.mxml files under it.  
Are these initialized when the state changes to include that class?  Or are 
they created when the application initialized?  Then also, are the instances 
destroyed or are they persistent (data still lives in them) when the login.mxml 
class changes states say from registrationform to loginform?

 

Thanks much!

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Gordon 
Smith
Sent: Monday, July 28, 2008 3:34 PM
To: flexcoders@yahoogroups.com
Subject: {Disarmed} RE: [flexcoders] mxml components

 

> all classes are created when the application is started

 

AS3 classes get initialized -- meaning that their static variables get set and 
their static methods get executed -- in a lazy fashion, as they are used. If 
you have bytecode for a class in your SWF and that class doesn't get used by 
other code, that class will never get initialized.

 

On the other hand, *instances* of DisplayObject classes get created "top down" 
when you use MXML. The Player automatically creates an instance of 
SystemManager. The instance of SystemManager automatically creates an instance 
of MainClass as its child. The instance of MainClass creates Class2 as its 
child. Etc. MXML, with its tags nested inside other tags, is essentially 
shorthand. For example,

 



 

is basically shorthand for

 

public var b:Button;

...

// inside some method:

b = new Button();

b.label = "OK";

addChild(b);

 

It sounds like you might want to experiment with dynamically creating class 
instances of DisplayObjects like this with 'new' -- and attaching them to 
parents with addChild() and detatching them with removeChild() -- in order to 
have more of a correspondence with what you're familiar with, namely C++. It 
might be that the MXML syntax, which hides the instantiation details, is 
confusing you.

 

> In C++ I would initialize the classes I wanted to use by using calling the 
> class initializer().

 

I think you mean that you would create the instances you wanted by using the 
'new' operator, which invokes the class's constructor.

 

> if I needed to access a private variable from MainClass.mxml I included the 
> header file (in this case the class4.mxml file)

 

There are no header files in AS3. Instead of 'include'ing a header file, you 
import a class. But if something is private you can't access it from any other 
class.

 

> Also in C++ when I'm done with the instance I needed to call the destructor 
> to shut the class down and free the memory

> I haven't seen a reference yet to destroy a class instances in Flex/AS3

 

A C++ destructor doesn't shut a class down; it gets called when an *instance* 
is freed with the 'delete' operator. You don't have to delete instances in AS3 
because they get "garbage collected". Periodically the runtime determines 
whether there are any references to an instance. If not, it frees it. There is 
no method similar to a destructor that gets called when this happens.

 

> I've gotten confused on how long those class instances live and when exactly 
> they are initialized. 

 

In the case you're describing, they live until you quit the app. If you did 
something like use removeChild() to detach the instance of Class3 from the 
instance of Class2, then the instances of Class3 and Class4 would become 
subject to garbage collection. (Which doesn't necessarily ensure that they'll 
actually get garbage collected unless the Player decides it is running low on 
memory.) They were initialized by methods of framework core classes, such as 
Container and SystemManager, in the top-down order that I previously described.

> When I use the debugger it doesn't look like in the above example that 
> class4.mxml stays active if I leave the Class3.mxml code.

I'm not clear on  what you're seeing, but it sounds like you're misinterpreting 
it.

Gordon Smith
Adobe Flex SDK Team

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Scott
Sent: Saturday, July 26, 2008 4:16 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] mxm

[flexcoders] Re: How to control positioning of Dynamic Control in a panel?

2008-07-29 Thread valdhor
panel.AddChildAt ?

--- In flexcoders@yahoogroups.com, "pbrendanc" <[EMAIL PROTECTED]> wrote:
>
> I have a panel that will contain a dynamically created custom grid
> component(the size is determined at run time). The grid is added to
> the panel via the panel.AddChild() method and is placed at the bottom
> of the form by default. I need to place a control bar (and other
> controls) below the grid.
> 
> Currently the AddChild() puts the grid at the bottom of the form,
> after, rather than before the control bar. I need it to go before the
> control bar (in the middle of a VBox actually).
> 
> Is there a way to set up a placeholder or template to force the grid
> placement correctly? Is this possible? Any refs on how to do this?
> 
> TIA,
> Patrick
>




[flexcoders] Stopping sound at certain position

2008-07-29 Thread Mark Carter

Ok, I must be missing something obvious here, but here goes...

I want to be able to play a sound from one position to another. The first
bit is easy because the play() method takes a position. But how about
automatically stopping the sound playback at another position?

Suppose I want to play an mp3 from position 2 to position 3...

Ideally, I want to add an event listener to when the soundchannel hits the
3 position so that I can then invoke the stop() method. But it looks
like this is not possible.

Another option might be to use the Timer class. But what if the mp3 file has
been played back slower than realtime (network issues)...?
-- 
View this message in context: 
http://www.nabble.com/Stopping-sound-at-certain-position-tp18714504p18714504.html
Sent from the FlexCoders mailing list archive at Nabble.com.



[flexcoders] Re: Mouse DOUBLE_CLICK not fired in Browser but in AIR

2008-07-29 Thread valdhor
Given the following:


http://www.adobe.com/2006/mxml";
layout="absolute" creationComplete="creationCompleteHandler()">
 
 
 
 
 
 


I get the following output if I double click the button:

onMouseDown
onMouseClick
onMouseDown
onMouseDblClick


--- In flexcoders@yahoogroups.com, "Vijay Ganesan" <[EMAIL PROTECTED]>
wrote:
>
>
> I need to handle MOUSE_DOWN because I'm enabling drag and drop.
> Again the weird thing is that the AIR version works fine.
>
> --- In flexcoders@yahoogroups.com, "valdhor" stevedepp@ wrote:
> >
> > Don't quote me on this but it is probably because the
> > MouseEvent.MOUSE_DOWN event is captured before a double click. If
you
> > change the event listener from MouseEvent.MOUSE_DOWN to
> > MouseEvent.CLICK then it works as expected.
> >
> >
> > --- In flexcoders@yahoogroups.com, "Vijay Ganesan"
> >  wrote:
> > >
> > > I have the same code running in an AIR app and in a browser app -
the
> > > only difference being the containing mx:WindowedApplication versus
> > > mx:Application. See code below for both. Double clicking on the
button
> > > in the AIR app works fine (MouseEvent.DOUBLE_CLICK gets fired) but
the
> > > same does not fire in the browser version. Can someone tell me
what is
> > > going on here?
> > >
> > > Thanks
> > > Vijay
> > >
> > > AIR version:
> > > 
> > > http://www.adobe.com/2006/mxml";
> > > layout="absolute" creationComplete="creationCompleteHandler()">
> > >   
> > > 
> > >   
> > >
> > >   
> > > 
> > >   
> > >
> > > 
> > >
> > > Browser version:
> > > 
> > > http://www.adobe.com/2006/mxml";
> > > layout="absolute" creationComplete="creationCompleteHandler()">
> > >   
> > > 
> > >   
> > >
> > >   
> > > 
> > >   
> > >
> > > 
> > >
> >
>



Re: [flexcoders] How long to build a Flex app....

2008-07-29 Thread Greg Morphis
My professional opinion is an eternity..
;)

On Mon, Jul 28, 2008 at 11:07 PM, Alan <[EMAIL PROTECTED]> wrote:
> I know this is a pretty broad question...
>
> I'm new to Flex, and having fun with it, but I'd like to get an idea
> how long these things take to make.
>
> Instead of me trying to pitch a hypothetical situation, maybe anyone
> interested in answering could  describe an app they made
> and how long it took and maybe even some juicy gossip about crazy
> clients.
>
> Thanks,
>
> Alan
>
> 
>
> --
> Flexcoders Mailing List
> FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> Search Archives: 
> http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links
>
>
>
>


[flexcoders] Re: How long to build a Flex app....

2008-07-29 Thread Jason B
It really depends on the flex coder since each coder could take longer
depending on thier understanding of the project and database functions
etc...and whether or not they are building the middleware code too?
We have an app with about 30 tabs and over 600 objects total on the
flex code, and about 1400 lines in mxml and 3500 lines in action script.
It took me about 1 month and im the only developer and im also
developing the middleware and database writes with php too.
The more you do the more you learn and faster too.


--- In flexcoders@yahoogroups.com, Alan <[EMAIL PROTECTED]> wrote:
>
> I know this is a pretty broad question...
> 
> I'm new to Flex, and having fun with it, but I'd like to get an idea  
> how long these things take to make.
> 
> Instead of me trying to pitch a hypothetical situation, maybe anyone  
> interested in answering could  describe an app they made  
> and how long it took and maybe even some juicy gossip about crazy  
> clients.
> 
> Thanks,
> 
> Alan
>




[flexcoders] Hotkey Class type variable for certain labels

2008-07-29 Thread Jason B
I've got several labels which shouldnt be shown on screen but if a
user hits a hotkey it would be nice to show them, what im wondering...
Is there a way to tag these items with a class like in Html so i can
have a function trigger the visible field on and off.

I know i can reference the ID but I was wondering if theres a class
like also available then i wouldnt have to reference every id flag for
all objects which are about 500 or so.



  1   2   >