[flexcoders] Resizing a ROW of a "List" view.

2006-11-26 Thread Steve Kellogg @ Project SOC
Hello,

 

I'm displaying a list of rows. The rows are rendered via an Item renderer.

 

One of the items in the row is a "Text" field that's setup to wrap text.  As
per the documentation, I've set the WIDTH of the Text field (to "100%") but
NOT the height, so that the text field can decide for itself how high the
Text needs to be.

 

When the control first appears, it CORRECTLY sets the size of each row to
the wrapped height of the text control within the Renderer (it's a beautiful
thing).

 

When I change the WIDTH of the control, however (via resizing the window, or
moving the HDivider that the list sits atop), the list does NOT change the
Row height to accommodate the new height of the row (yes, the text DOES
re-wrap, and this is why I was hoping that the List would 'see' this event).

 

Is there anyway for me to tell this list to continue looking for re-wrap of
the enclosed text?  I would have thought that this would be automatic since
SO MUCH of the layout is indeed automagical.

 

Any advice is appreciated.

 

 

Steve

 

Steve Kellogg

Peak8 Solutions

1401 14th Street

Boulder, Colorado

80302, USA

Fax: 303.415.2597

E-Mail: [EMAIL PROTECTED]

 



RE: [flexcoders] VBox Size Listener?

2006-11-26 Thread Shannon Hicks
I think there's an onResize property.
 
Shan

  _  

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of {reduxdj}
Sent: Sunday, November 26, 2006 6:44 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] VBox Size Listener?



I have a vBox in my main application and when I add content to the vBox, 
the size changes. Is there a way that I can add a listener to the size 
of this box, and when it changes size, make it animate? I am sure there 
is, but I am not sure how to go about this effect.

Any ideas, thanks,
Patrick



 


Re: [flexcoders] Bit Off topic: Microsoft Vista VS Apollo/Flex/Flash

2006-11-26 Thread Andrew Muller

"few Linux/mac people" - Yes there are a smaller proportion of Mac users
(constantly increasing - there were a lot of switchers at MAX), but they're
often the real early adapters - and that's the folk who you want singing the
praises of your wonderful new creation...

On 25/11/06, camlinaeizerous <[EMAIL PROTECTED]> wrote:


  I still go to the occasional Microsoft conference when they are about
to release something big. Well yesterday was their "ready for a new
day" which was a show case of vista and office. I went to the
developer thread curious what programming would be like for Vista with
the changes that were made. Really long story short everything they
show cased reminded me of the capabilities of Apollo which is soon to
be released and Flex/Flash.

"Microsoft Expressions" a new development tool reminded a lot of
people of flash studio and it seems like a copy of flash with A
Microsoft label on top. Although I didn't get to see a lot of the
under working just a quick over view, essentially by default the time
line is on the bottom drawing tools on the right and library on the
left. It seemed so similar during the overview I heard people actually
laughing saying it looked like flash. however looking at the code that
was generated and the movements and transitions were basically
generated with java.

When they were showing how to program their "gadgets" which the
presenter even slipped and called widgets not just once but twice they
made it actually fairly simple. 3 short files of javascript, xaml
markup, and c# for a simple gadget however with the demos I have seen
of Apollo I believe in the end there will be by far more Apollo
gadgets/widgets or what ever you want to call them compared to Vista
gadgets. And as a plus Apollo is cross platform where needless to say
the few Linux/mac people that were there were not impressed with the
windows only capability but talking with a couple saying that Apollo
could do the same things but also work on Linux/mac machine I must say
it really made their day.

While Apollo's future will obviously go far beyond just simple widgets
this just seems to be how Microsoft lined up their development demos
showing mainly a few gadgets and bunch of "look what happens to the
button when I click on it". The only thing that I saw showcased as far
as application development that Microsoft has an edge with is 3d
rendering, which in time I imagine flash will have very little
problems with.

I have also been wondering if they got their RMA term from RIA. Rich
Media Application vs Rich Internet Application?

 





--
---
Andrew Muller
http://www.webqem.com


Re: [flexcoders] Bit Off topic: Microsoft Vista VS Apollo/Flex/Flash

2006-11-26 Thread John C. Bland II

Vista isn't -vs- Apollo/Flex/Flash. Here's the breakdown:

WPF vs Apollo (and swf wrappers)
WPF/E vs Flex/Flash

I didn't read your entire post but I wanted to add that clarification. The
Expression family isn't the whole round trip. You build WPF apps, most of
the time at least, with Visual Studio. Expression has GREAT integration
between the products. You start as a designer creating the interface (with
full XAML code exported), move to Interactive Designer and add a few mod's
(maybe even some code), then use the same code in Visual Studio to tie in
data and everything else. Graphics and everything are all in code. Very
nicely done...seriously.

My opinion as to how they compare:

WPF -vs- Apollo
* WPF will probably blow Apollo out of the water in terms of system
integration. Apollo has a few things that integrate into the OS but being
cross platform somewhat prevents it from fully integrating like WPF. Keep in
mind...WPF is .NET so you have great control over Windows.
* Apollo easily wins at cross platform.
* Apollo wins at ease of use/creation. WPF isn't terribly difficult but for
normal .NET developers not used to control over the UI that WPF gives, it
can be a bit daunting.
* The power of WPF apps wins. Native database support, app signing (which I
don't think Apollo will have), etc.

WPF/E -vs- Flash/Flex
* No argument...WPF/E has a LONG way to go. Flash/Flex wins without a doubt.
Nothing further here. :-)

On 11/26/06, Sebastian Zarzycki <[EMAIL PROTECTED]> wrote:


  camlinaeizerous wrote:

"Microsoft Expressions" a new development tool reminded a lot of
people of flash studio and it seems like a copy of flash with A
Microsoft label on top. Although I didn't get to see a lot of the
under working just a quick over view, essentially by default the time
line is on the bottom drawing tools on the right and library on the
left. It seemed so similar during the overview I heard people actually
laughing saying it looked like flash. however looking at the code that
was generated and the movements and transitions were basically
generated with java.


Actually, Microsoft Expression is new Microsoft Platform for "artistic"
development. It consist
of three tools : Web Designer (codename Quartz) - which is a replacement
for Office Front Page (there's no FrontPage in Office 2007).,
Graphic Designer (codename Acrylic), and Interactive Designer (codename
Sparkle). You were talking about the last one, I guess.

I'm checking expression's website for a year, to get some data for flex
and apollo comparisions. Been playing around with Sparkle few hours.
There are definitely some cool things about it, but I, for instance, don't
like the incoherent (but nice) interface and
I fail to understand how to build RIA using old timeline concept. Sparkle
is meant to be a tool for designers, not coders. Let's see how
they will cooperate in future. Today, as a developer from java world, I
can quickly learn how to build an working and functional app in Flex. I have
great troubles with achieving the same with Sparkle.


--
| Sebastian Zarzycki / rat[tkin]
| [EMAIL PROTECTED]
| i'm a little lost in this postmodern space
| gg:#2692696 / icq:#264185739 irc :#tool #ot-oa / skype:rattkin








--
John C. Bland II
Chief Geek
Katapult Media, Inc. - www.katapultmedia.com
---
Biz Blog - http://blogs.katapultmedia.com/jb2
Personal Blog - http://blog.blandfamilyonline.com
http://www.lifthimhigh.com - "Christian Products for Those Bold Enough to
Wear Them"
Home of FMUG.az - http://www.gotoandstop.org
Home of AZCFUG - http://www.azcfug.org


[flexcoders] FLEX DEMOS and Who's GOT them to Share

2006-11-26 Thread spideyaround
I am not a hands on Flex Programmer, however I am known to dabble in
flash a bit. I was wondering if people can point me to some good flex
demo sites or submit back to this board on projects your working on.

Peter
petescarwash.com





[flexcoders] Field in viewstack null until the layere its on has been made visible?

2006-11-26 Thread rumpleminzeflickr
Hi,

I have a datagrid, when I click on an item it switches the viewstack to 
another element but doesn't display the data in a field because the 
field is null. I get an error but if I run it again it works.

Looking at the debugger the field is null the first time, the second 
time it is of the correct type (mx.controls ...)

Is this normal behaviour? How would I get around this so I can populate 
the field before it is displayed.

Many thanks,

Brett



Re: [flexcoders] Securing WebServices

2006-11-26 Thread Diego Guebel
Hi there,
You can use headers on SOAP, take a look at  
http://livedocs.macromedia.com/flex/2/docs/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Parts&file=1158.html

I'm using that in an application and works fine.

You can also use https for the login.

Diego.

On Mon, 27 Nov 2006 11:19:48 +1300, Sebastian Zarzycki  
<[EMAIL PROTECTED]> wrote:

> Tom Chiverton wrote:
>>> means that I have to add this token parameter to *every*
>>> webservice method. This is not acceptable, as I want (in fact, my
>>> customer wants)  my services to be free of such things. Authorization
>>> should be transparent (but flexible).  Then again I could have one big
>>> thing, ServiceLocator or something like that, so that
>>>
>>
>> It can't be transparent and work.
>> Somewhere along the line (no matter if HTTP basic or digest, token  
>> based, ...)
>> your client will have to do something.
>>
>
> Maybe I put myself wrong. What I thought of is to have some kind of
> proxy layer, managing ws authorization.
> WS-Security standard and my serverside (xfire) provides something like
> that (attaching filters to webservices, that are launched before actual
> webservice method, checking credentials and so on). But I don't have
> such thing (pack SOAP call into WS-Security standard) in client - and I
> miss that. By "transparent" I mean, that my actual webservice method
> looks as its just POJO, so, let's say "getObjectByID(int id)" does not
> translate into something like "getObjectByID(Token token, int id)".
> I'm just asking about how much control do I have about what Flex sends
> (with SOAP) to actual webservice? Can I put additional things into soap
> body/header? Could webservice AS3 class be extended to allow that?
>
>
> Dave Wolf wrote :
>
>>
>> What is wrong with standard J2EE security constraints? Place a
>> security constraint on the URI of the web service. You can then use
>> either FORM or BASIC auth for your Flex application as a whole an the
>> web service calls will inherit those credentials.
>
> Could you explain this a bit more? I'm afraid, I don't know what you are
> suggesting.
>
>




--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)

<*> To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 


[flexcoders] Adding dynamic fields to an ArrayCollection

2006-11-26 Thread michrx7
Using the code below I am able to create an array collection and set 
it as the provider of a datagrid (the resort the columns to match 
the way I want them to display). 

Now I have two issues I need to solve if anyone is able to help: 

1) I have of defined static arrays (mynewArray1 - 3) to add to the 
array collection and I need these to be dynamic (mynewArray[0] - n)

2) When I use myArrayCol.addItem({Name:...) I need to build this 
dynamically since the field names will be dynamic. I'd like to use 
the mycolNames array instead. As an example myArrayCol.addItem
({mycolNames[0]:mynewArray[n][z]}

Here is the code:

___

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


 


 


___

I hope I'm being clear... I need to add an unknown number of columns 
to the ArrayCollection so I can't manually define it in the mxml. 
I'll be looping through a set of user choices and building the array 
collection based on those choices.

Please help!



[flexcoders] CSS stylesheets and Textfields

2006-11-26 Thread {reduxdj}
I have a stylesheet with my embedded font links that work fine, how do i 
use my stylesheet with a textformatter for a new text object?

var formatter:TextFormat = new TextFormat();
  
formatter.bold = true;
formatter.color = "0xFF";
formatter.font = "arial";
formatter.size = "32";
question.setTextFormat(formatter);

I've tried a couple different examples and the stylesheet stuff is a 
little hard for me wrap my head around.  I'm placing text over a 
rectangle that i draw, so the text class works better for me than the 
textfield class in this example.

Thanks,
Patrick



[flexcoders] VBox Size Listener?

2006-11-26 Thread {reduxdj}
I have a vBox in my main application and when I add content to the vBox, 
the size changes.  Is there a way that I can add  a listener to the size 
of this box, and when it changes size, make it animate?  I am sure there 
is, but I am not sure how to go about this effect.


Any ideas, thanks,
Patrick



[flexcoders] Set the Time Zone

2006-11-26 Thread bkeinan
Is there any way to define the time zone for the flash player from 
with in the Flex code?

Thanks,
Benny



Re: [flexcoders] adding Bitmap to a container

2006-11-26 Thread {reduxdj}
Mark:


Instantiate a new UIComponent then try:

import mx.controls.UIComponent;

...


var myComponent:UIComponent = new UIComponent();
 
(blah blah blah - Your code here then don't forget to add that 
component to the display list) 


addChild(myComponent);

This should fix your problem, hope this helps,

Patrick



Mark Piller wrote:
>
> I am experiencing a difficulting adding a Bitmap to a container using
> the addChild() method. The error i get is:
>
> TypeError: Error #1034: Type Coercion failed: cannot convert
> flash.display::[EMAIL PROTECTED] to mx.core.IUIComponent.
>
> The error actually makes sense since flash.display.Bitmap does not
> implement IUIComponent, which aparently is required, since the doc for
> mx.core.Container.addChild says:
>
> "Note: While the child argument to the method is specified as of type
> DisplayObject, the argument must implement the IUIComponent interface
> to be added as a child of a container. All Flex components implement
> this interface."
>
> However, the documentation for the Bitmap class states the following:
>
> "The Bitmap() constructor allows you to create a Bitmap object that
> contains a reference to a BitmapData object. After you create a Bitmap
> object, use the addChild() or addChildAt() method of the parent
> DisplayObjectContainer instance to place the bitmap on the display list."
>
> Anyone has any idea what's going on with this? Is the documentation
> incorrect? Has anyone been able to add Bitmap to the display list?
>
> Thanks,
> Mark
>
>  




Re: [flexcoders] Loader to Image

2006-11-26 Thread {reduxdj}
Sebastian:

Why don't you create your own component like the following then you can 
bind your component source to your variable then you can control size 
and effects etc.  I prefer SWFLoader to loader and i don't know why but 
everyone says to use that instead

var box:Thumb = new Thumb();
box.pSource = "myURLtoMyImage";

And this way you have complete flexablilty.


http://www.adobe.com/2006/mxml"; width="60" 
height="45" styleName="thumbUp" creationComplete="init()">









Sebastian Zarzycki wrote:
>
> I'm using Loader class to dynamically load images from server, as it's 
> advised in "Loading content dynamically" of Programming ActionScript 
> 3.0 - Flex doc.
> But there's one thing I don't understand. In example there, we have :
> |
> |var pictLdr:Loader = new Loader();
> pictLdr.load(new URLRequest(some_url));
> this.addChild(pictLdr);
>
> - and in every example, the Loader class is automatically added to a 
> certain container. How is that different from mx:Image? I don't have 
> image location at compilation time, it is created in runtime. Can I 
> point mx:Image source to computed url or not? If I have to use Loader 
> class then, is there any way to *copy* loader content into mx:Image I 
> have in my design?  I can use mx:Image as a container and put Loader 
> into it, but then I will loose my Image properties, like automatic 
> scaling. What I am missing?
>
> It is important for me, to see the image container in Flex Builder, so 
> when I show the screen mockup to my client, he will be able to see 
> that at this and this place there will be image loaded at runtime. 
> Should I use SWFLoader maybe?
>
>
>
> -- 
> | Sebastian Zarzycki / rat[tkin]
> | [EMAIL PROTECTED]
> | i'm a little lost in this postmodern space
> | gg:#2692696 / icq:#264185739 irc :#tool #ot-oa / skype:rattkin
>  




--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)

<*> To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 


RE: [flexcoders] mx.automation

2006-11-26 Thread Matt Chotin
Yeah, that shouldn't really be possible.

The automation stuff is I think due to a bug, but you're using a build
that others on this list aren't, ahem :-)

Matt

-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Tom Chiverton
Sent: Friday, November 24, 2006 8:36 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] mx.automation

On Friday 24 November 2006 10:52, EECOLOR wrote:
> The source code that comes with the Flex framework is not the same as
the
> compiled frameworks swc file. 

That's odd - have you filled a bug / wish list ?

-- 
Tom Chiverton
Helping to conveniently deliver dynamic synergies



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 St James's Court Brown Street Manchester M2 2JF.  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 Law Society.

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
8008.

For more information about Halliwells LLP visit www.halliwells.com.



--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives:
http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links






Re: [flexcoders] Bit Off topic: Microsoft Vista VS Apollo/Flex/Flash

2006-11-26 Thread Sebastian Zarzycki

camlinaeizerous wrote:


"Microsoft Expressions" a new development tool reminded a lot of
people of flash studio and it seems like a copy of flash with A
Microsoft label on top. Although I didn't get to see a lot of the
under working just a quick over view, essentially by default the time
line is on the bottom drawing tools on the right and library on the
left. It seemed so similar during the overview I heard people actually
laughing saying it looked like flash. however looking at the code that
was generated and the movements and transitions were basically
generated with java.


Actually, Microsoft Expression is new Microsoft Platform for "artistic" 
development. It consist
of three tools : Web Designer (codename Quartz) - which is a replacement 
for Office Front Page (there's no FrontPage in Office 2007).,
Graphic Designer (codename Acrylic), and Interactive Designer (codename 
Sparkle). You were talking about the last one, I guess.


I'm checking expression's website for a year, to get some data for flex 
and apollo comparisions. Been playing around with Sparkle few hours.
There are definitely some cool things about it, but I, for instance, 
don't like the incoherent (but nice) interface and
I fail to understand how to build RIA using old timeline concept. 
Sparkle is meant to be a tool for designers, not coders. Let's see how
they will cooperate in future. Today, as a developer from java world, I 
can quickly learn how to build an working and functional app in Flex. I have

great troubles with achieving the same with Sparkle.


--
| Sebastian Zarzycki / rat[tkin]
| [EMAIL PROTECTED]
| i'm a little lost in this postmodern space
| gg:#2692696 / icq:#264185739 irc :#tool #ot-oa / skype:rattkin


[flexcoders] Loader to Image

2006-11-26 Thread Sebastian Zarzycki
I'm using Loader class to dynamically load images from server, as it's 
advised in "Loading content dynamically" of * 
*Programming ActionScript 3.0 - Flex doc.

But there's one thing I don't understand. In example there, we have :
|
|var pictLdr:Loader = new Loader();
pictLdr.load(new URLRequest(some_url));
this.addChild(pictLdr);

- and in every example, the Loader class is automatically added to a 
certain container. How is that different from mx:Image? I don't have 
image location at compilation time, it is created in runtime. Can I 
point mx:Image source to computed url or not? If I have to use Loader 
class then, is there any way to *copy* loader content into mx:Image I 
have in my design?  I can use mx:Image as a container and put Loader 
into it, but then I will loose my Image properties, like automatic 
scaling. What I am missing?


It is important for me, to see the image container in Flex Builder, so 
when I show the screen mockup to my client, he will be able to see that 
at this and this place there will be image loaded at runtime. Should I 
use SWFLoader maybe?




--
| Sebastian Zarzycki / rat[tkin]
| [EMAIL PROTECTED]
| i'm a little lost in this postmodern space
| gg:#2692696 / icq:#264185739 irc :#tool #ot-oa / skype:rattkin


Re: [flexcoders] Securing WebServices

2006-11-26 Thread Sebastian Zarzycki

Tom Chiverton wrote:

means that I have to add this token parameter to *every*
webservice method. This is not acceptable, as I want (in fact, my
customer wants)  my services to be free of such things. Authorization
should be transparent (but flexible).  Then again I could have one big
thing, ServiceLocator or something like that, so that



It can't be transparent and work.
Somewhere along the line (no matter if HTTP basic or digest, token based, ...) 
your client will have to do something.
  


Maybe I put myself wrong. What I thought of is to have some kind of 
proxy layer, managing ws authorization.
WS-Security standard and my serverside (xfire) provides something like 
that (attaching filters to webservices, that are launched before actual 
webservice method, checking credentials and so on). But I don't have 
such thing (pack SOAP call into WS-Security standard) in client - and I 
miss that. By "transparent" I mean, that my actual webservice method 
looks as its just POJO, so, let's say "getObjectByID(int id)" does not 
translate into something like "getObjectByID(Token token, int id)".
I'm just asking about how much control do I have about what Flex sends 
(with SOAP) to actual webservice? Can I put additional things into soap 
body/header? Could webservice AS3 class be extended to allow that?



Dave Wolf wrote :



What is wrong with standard J2EE security constraints? Place a
security constraint on the URI of the web service. You can then use
either FORM or BASIC auth for your Flex application as a whole an the
web service calls will inherit those credentials. 


Could you explain this a bit more? I'm afraid, I don't know what you are 
suggesting.



--
| Sebastian Zarzycki / rat[tkin]
| [EMAIL PROTECTED]
| i'm a little lost in this postmodern space
| gg:#2692696 / icq:#264185739 irc :#tool #ot-oa / skype:rattkin


[flexcoders] Newbie question: Showing a vertical scroll bar on application

2006-11-26 Thread Flexy
Hi,

 

I am adding titlewindows using the popupManager on the application canvas, I
have many of them so some are beyond the screen height, However, no vertical
scrollbar shows - how can I make sure the vertical scroll bar shows if there
are controls beyond the screen height?

 

Thanks,

 

Flexy.

 

 

 



[flexcoders] Re: head namespace in Flex 2 Style Explorer

2006-11-26 Thread Mark Piller
I totally missed it. Thanks for pointing it out!

Cheers,
Mark

--- In flexcoders@yahoogroups.com, "kristoffersingleton"
<[EMAIL PROTECTED]> wrote:
>
> Mark... 
> 
> It is defined right in the tag you are looking at...
> 
> 
> 
> the xmlns:head="*" does the trick setting the head namespace to the
> directory where the mxml file you are looking at resides.
> 
> HTH
> 
> _K
> 
> --- In flexcoders@yahoogroups.com, "Mark Piller"  wrote:
> >
> > Hi guys,
> > 
> > I've been looking into the Flex 2 Style Explorer at
> >
>
http://examples.adobe.com/flex2/consulting/styleexplorer/Flex2StyleExplorer.html
> > 
> > and have a question about the "head" namespace used in the example.
> > Could someone point out where in the code that namespace is being
> > declared? For example, there is a reference to head:GlassHeaders all
> > over the place, but I cannot understand how "head" is resolved. Does
> > it have a special meaning? What am I missing here?
> > 
> > Thanks,
> > Mark
> >
>




[flexcoders] adding Bitmap to a container

2006-11-26 Thread Mark Piller
I am experiencing a difficulting adding a Bitmap to a container using
the addChild() method. The error i get is:

TypeError: Error #1034: Type Coercion failed: cannot convert
flash.display::[EMAIL PROTECTED] to mx.core.IUIComponent.

The error actually makes sense since flash.display.Bitmap does not
implement IUIComponent, which aparently is required, since the doc for
mx.core.Container.addChild says:

"Note: While the child argument to the method is specified as of type
DisplayObject, the argument must implement the IUIComponent interface
to be added as a child of a container. All Flex components implement
this interface."

However, the documentation for the Bitmap class states the following:

"The Bitmap() constructor allows you to create a Bitmap object that
contains a reference to a BitmapData object. After you create a Bitmap
object, use the addChild() or addChildAt() method of the parent
DisplayObjectContainer instance to place the bitmap on the display list."

Anyone has any idea what's going on with this? Is the documentation
incorrect? Has anyone been able to add Bitmap to the display list?

Thanks,
Mark







RE: [flexcoders] Re: Scrolling TileList?

2006-11-26 Thread Steve Kellogg @ Project SOC
Tim,

 

Thanks VERY much.  I appreciate it.

 

 

Steve

 

  _  

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Tim Hoff
Sent: Sunday, November 26, 2006 11:35 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Scrolling TileList?

 

Hi Steve,

You could place the TileList in a Canvas container. Only set the 
height of the Canvas; not the TileList.

-TH

--- In [EMAIL PROTECTED]  ups.com,
"Steve Kellogg @ Project SOC" 
<[EMAIL PROTECTED]> wrote:
>
> Hello,
> 
> 
> 
> I have a TileList that conatins some images and text. The normal 
scroll
> behavior is to scroll to each row in the list, but I need to be 
able to
> scroll at a finer level, so that I can scroll through large 
pictures that
> might be too big to show completely in the window.
> 
> 
> 
> Can anyone help?
> 
> 
> 
> Thanks in advance,
> 
> 
> 
> Steve
> 
> 
> 
> Steve Kellogg
> 
> Peak8 Solutions
> 
> 1401 14th Street
> 
> Boulder, Colorado
> 
> 80302, USA
> 
> Fax: 303.415.2597
> 
> E-Mail: [EMAIL PROTECTED]
>

 



[flexcoders] Re: head namespace in Flex 2 Style Explorer

2006-11-26 Thread kristoffersingleton
Mark... 

It is defined right in the tag you are looking at...



the xmlns:head="*" does the trick setting the head namespace to the
directory where the mxml file you are looking at resides.

HTH

_K

--- In flexcoders@yahoogroups.com, "Mark Piller" <[EMAIL PROTECTED]> wrote:
>
> Hi guys,
> 
> I've been looking into the Flex 2 Style Explorer at
>
http://examples.adobe.com/flex2/consulting/styleexplorer/Flex2StyleExplorer.html
> 
> and have a question about the "head" namespace used in the example.
> Could someone point out where in the code that namespace is being
> declared? For example, there is a reference to head:GlassHeaders all
> over the place, but I cannot understand how "head" is resolved. Does
> it have a special meaning? What am I missing here?
> 
> Thanks,
> Mark
>




[flexcoders] Re: Scrolling TileList?

2006-11-26 Thread Tim Hoff
Hi Steve,

You could place the TileList in a Canvas container.  Only set the 
height of the Canvas; not the TileList.

-TH

--- In flexcoders@yahoogroups.com, "Steve Kellogg @ Project SOC" 
<[EMAIL PROTECTED]> wrote:
>
> Hello,
> 
>  
> 
> I have a TileList that conatins some images and text.  The normal 
scroll
> behavior is to scroll to each row in the list, but I need to be 
able to
> scroll at a finer level, so that I can scroll through large 
pictures that
> might be too big to show completely in the window.
> 
>  
> 
> Can anyone help?
> 
>  
> 
> Thanks in advance,
> 
>  
> 
> Steve
> 
>  
> 
> Steve Kellogg
> 
> Peak8 Solutions
> 
> 1401 14th Street
> 
> Boulder, Colorado
> 
> 80302, USA
> 
> Fax: 303.415.2597
> 
> E-Mail: [EMAIL PROTECTED]
>




[flexcoders] Scrolling TileList?

2006-11-26 Thread Steve Kellogg @ Project SOC
Hello,

 

I have a TileList that conatins some images and text.  The normal scroll
behavior is to scroll to each row in the list, but I need to be able to
scroll at a finer level, so that I can scroll through large pictures that
might be too big to show completely in the window.

 

Can anyone help?

 

Thanks in advance,

 

Steve

 

Steve Kellogg

Peak8 Solutions

1401 14th Street

Boulder, Colorado

80302, USA

Fax: 303.415.2597

E-Mail: [EMAIL PROTECTED]

 



Re: [flexcoders] How to implement Lazy Hibernate?

2006-11-26 Thread Douglas McCarroll
Hi Kelly,

 > Maybe if you eliminated the one-to-many relationships on Film and Actor.

 > Then you would have a separate collection of FilmActors that you 
could query by film or actor.

 > It would eliminate the circular reference but I am not sure it’s the 
best solution or what you had in mind.

Yes, I've had similar thoughts but like you I'm not sure it's the best 
solution. I've been inclined to think that HibernateTools probably knows 
what it's doing and that I should be able to use the structure that it 
has created. But I'm also not sure that this is a safe assumption. :-)

 > Let me know what you end up doing, I am curious.

Will do. :-)

Douglas


--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)

<*> To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 


RE: [flexcoders] How to implement Lazy Hibernate?

2006-11-26 Thread Kelly
I am not sure what the best way of mapping it would be so as to eliminate
the circular reference.

 

I am not great at Hibernate.

 

 

Maybe if you eliminated the one-to-many relationships on Film and Actor.

 

Then you would have a separate collection of FilmActors that you could query
by film or actor.

It would eliminate the circular reference but I am not sure it's the best
solution or what you had in mind.

 

Let me know what you end up doing, I am curious.

 

 

--Kelly

 

 

 

  _  

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Douglas McCarroll
Sent: Sunday, November 26, 2006 7:53 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] How to implement Lazy Hibernate?

 

Hi Kelly,

> Lazy Loading probably isn't going to help you.
>
> You probably want to consider doing an intermediate
> class between any many-to-many associations in
> hibernate so you have two many-to-one associations
> instead.

Thanks for your response Kelly, but I think that I already have an 
intermediate class, implemented on both client (.as) and server (.java)

The FilmActor table has many-to-one relationships with both Film & Actor 
tables.

FilmActor.java & FilmActorVO.as are the intermediate classes that map to 
this table.

I'm guessing that you got the impression that I have no intermediate 
class from my explanation, right below the first link, which I 
oversimplified.

Here's a revised version:

Hi All,

I'm attempting to create a Cairngorm/FDMS/Hibernate/MySQL example 
program which I'll publish to the community once completed. I used the 
MySQL Sakila sample DB (pared down to 3 tables - Film, Actor & FilmActor 
- at present) and used HibernateTools to reverse engineer the requisite 
Java and Hibernate files. So far, so good. I've even managed to 
successfully write corresponding .as files and implement the beginnings 
of a Cairngorm front end.

And it works. Kind of.

The problem is that the persistence layer takes forever to load, even 
though the 3 tables only have hundreds or thousands of records each. 
I've temporarily pared them down considerably (to 100, 100 & 500 
records) and the program now loads quickly enough that I can continue 
development work, but the performance issue needs to be addressed.

It's fairly easy to see what the problem is. Here's a picture of the 
variable window that depicts the situation in all its glory:

http://www.brightwo

rks.com/technology/tech_questions/hibernate_lazy_associations/deeply_nested_
actors_and_films.jpg 

Beautiful, isn't it?? :-)

There's a reference chain that goes like this on the client side:

ActorVO references...

A FilmActors ArrayCollection which contains...

ObjectProxy instances (translations of FilmActor.java) which reference...

Both ActorVO & FilmVO instances which both reference...

A FilmActors ArrayCollection which contains...

ObjectProxy instances (translations of FilmActor.java) which reference...

Both ActorVO & FilmVO instances which both reference...

Etc, etc, etc, etc, etc.

I wonder how many levels deep this goes? The program doesn't hang so I 
assume that Flex puts a stop to it at some point...

Anyway, I'm assuming that the solution is to implement lazy 
associations. My understanding is that Hibernate does lazy associations 
by default, so once I set up my destinations properly all will be well. 
But despite several attempts, I keep getting error messages.

Could one of the Hibernate gurus that inhabits this list point me in the 
correct direction?

The DB's schema is outlined here:

http://www.brightwo

rks.com/technology/tech_questions/hibernate_lazy_associations/index.html 

And all relevant code, plus my latest error message, is here:

http://www.brightwo

rks.com/technology/tech_questions/hibernate_lazy_associations/code.txt 

I assume that my problem is in data-management-config.xml, but I'm new 
to all of this and could be doing other things wrong as well.

TIA!

Douglas

-

Douglas McCarroll

CairngormDocs.org Webmaster
http://www.Cairngor  mDocs.org

Flex Developer
http://www.brightwo  rks.com
617.459.3840

-

 



Re: [flexcoders] How to implement Lazy Hibernate?

2006-11-26 Thread Douglas McCarroll
Hi Kelly,

 > Most of the time you need additional information stored in the "link 
table"

It looks to me as though I have a link table - film_actor.

I'm assuming that as my .java and .hbm.xml classes are generated by 
HibernateTools from the DB, they are correct.

I'm guessing that they work fine absent FDMS, despite their circular 
references, due to the fact that Hibernate has lazy loading turned on by 
default.

And that the problem enters in because FDMS has lazy loading turned off 
by default.

Therefore, the solution would be to turn lazy loading off in my 
data-services-config.xml file.

Problem is, I get an error when I do this.

I've gotten some input from another person - may be a simple matter of 
handling the error in try-catch block - and I'll report back to the list 
on what I figure out...

Thanks for your input!

Douglas




Kelly wrote:
>
> From Hibernate Best Practices:
>
> *Don't use exotic association mappings.*
>
> Good usecases for a real many-to-many associations are rare. Most of 
> the time you need additional information stored in the "link table". 
> In this case, it is much better to use two one-to-many associations to 
> an intermediate link class. In fact, we think that most associations 
> are one-to-many and many-to-one, you should be careful when using any 
> other association style and ask yourself if it is really neccessary.
>
> http://www.hibernate.org/hib_docs/v3/reference/en/html/best-practices.html 
> 
>
> I think FDS has a hibernate adaptor but that isn’t going to solve your 
> circular reference.
>
> --Kelly
>
> 
>
> *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] 
> *On Behalf Of *Carlos Rovira
> *Sent:* Sunday, November 26, 2006 12:49 AM
> *To:* flexcoders@yahoogroups.com
> *Subject:* Re: [flexcoders] How to implement Lazy Hibernate?
>
> Hi,
>
> I'm currently searching for info about this topic. Could someone 
> provide some links about how FDS and Hibernate work thogether in this 
> issue?
>
> Thanks.
>
> C.
>
>
>
> On 11/26/06, *Kelly* <[EMAIL PROTECTED] > wrote:
>
> Lazy Loading probably isn't going to help you.
>
> You probably want to consider doing an intermediate class between any 
> many-to-many associations in hibernate so you have two many-to-one 
> associations instead.
>
> --Kelly
>
> 
>
> *From:* [EMAIL PROTECTED] ups.com  
> [mailto:[EMAIL PROTECTED]  ups.com 
> ] *On Behalf Of *Douglas McCarroll
> *Sent:* Saturday, November 25, 2006 3:32 PM
> *To:* flexcoders@yahoogroups.com 
> *Subject:* [flexcoders] How to implement Lazy Hibernate?
>
> Hi All,
>
> I'm attempting to create a Cairngorm/FDMS/Hibernate/MySQL example
> program which I'll publish to the community once completed. I used the
> MySQL Sakila sample DB (pared down to 3 tables - Film, Actor & FilmActor
> - at present) and used HibernateTools to reverse engineer the requisite
> Java and Hibernate files. So far, so good. I've even managed to
> successfully write corresponding .as files and implement the beginnings
> of a Cairngorm front end.
>
> And it works. Kind of.
>
> The problem is that the persistence layer takes forever to load, even
> though the 3 tables only have hundreds or thousands of records each.
> I've temporarily pared them down considerably (to 100, 100 & 500
> records) and the program now loads quickly enough that I can continue
> development work, but the performance issue needs to be addressed.
>
> It's fairly easy to see what the problem is. Here's a picture of the
> variable window that depicts the situation in all its glory:
>
> http://www.brightworks.com/technology/tech_questions/hibernate_lazy_associations/deeply_nested_actors_and_films.jpg
>  
> 
>
> Beautiful, isn't it?? :-)
>
> In other words, every actor references all films that the actor is in...
>
> And each of these films references all actors in the film...
>
> And each of these actors references all films that the actor is in...
>
> And each of these films references all actors in the film...
>
> Etc, etc, etc, etc, etc.
>
> I wonder how many levels deep this goes? The program doesn't hang so I
> assume that Flex puts a stop to it at some point...
>
> Anyway, I'm assuming that the solution is to implement lazy
> associations. My understanding is that Hibernate does lazy associations
> by default, so once I set up my destinations properly all will be well.
> But despite several attempts, I keep getting error messages.
>
> Could one of the Hibernate gurus that inhabits this list point me in the
> correct direction?
>
> The DB's schema is outlined here:
>
> http://

RE: [flexcoders] How to implement Lazy Hibernate?

2006-11-26 Thread Kelly
>From Hibernate Best Practices:

 

 

Don't use exotic association mappings. 

Good usecases for a real many-to-many associations are rare. Most of the
time you need additional information stored in the "link table". In this
case, it is much better to use two one-to-many associations to an
intermediate link class. In fact, we think that most associations are
one-to-many and many-to-one, you should be careful when using any other
association style and ask yourself if it is really neccessary.

 

http://www.hibernate.org/hib_docs/v3/reference/en/html/best-practices.html

 

 

 

 

I think FDS has a hibernate adaptor but that isn't going to solve your
circular reference.

 

 

 

 

--Kelly

 

  _  

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Carlos Rovira
Sent: Sunday, November 26, 2006 12:49 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] How to implement Lazy Hibernate?

 

Hi,

I'm currently searching for info about this topic. Could someone provide
some links about how FDS and Hibernate work thogether in this issue?

Thanks.

C.





On 11/26/06, Kelly <[EMAIL PROTECTED]  com> wrote:

Lazy Loading probably isn't going to help you.

 

You probably want to consider doing an intermediate class between any
many-to-many associations in hibernate so you have two many-to-one
associations instead.

 

 

 

--Kelly

 

 

 

 

  _  

From: [EMAIL PROTECTED] ups.com [mailto:[EMAIL PROTECTED] ups.com
 ] On Behalf Of Douglas McCarroll
Sent: Saturday, November 25, 2006 3:32 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] How to implement Lazy Hibernate?

 

Hi All,

I'm attempting to create a Cairngorm/FDMS/Hibernate/MySQL example 
program which I'll publish to the community once completed. I used the 
MySQL Sakila sample DB (pared down to 3 tables - Film, Actor & FilmActor 
- at present) and used HibernateTools to reverse engineer the requisite 
Java and Hibernate files. So far, so good. I've even managed to 
successfully write corresponding .as files and implement the beginnings 
of a Cairngorm front end.

And it works. Kind of.

The problem is that the persistence layer takes forever to load, even 
though the 3 tables only have hundreds or thousands of records each. 
I've temporarily pared them down considerably (to 100, 100 & 500 
records) and the program now loads quickly enough that I can continue 
development work, but the performance issue needs to be addressed.

It's fairly easy to see what the problem is. Here's a picture of the 
variable window that depicts the situation in all its glory:

http://www.brightwo

rks.com/technology/tech_questions/hibernate_lazy_associations/deeply_nested_
actors_and_films.jpg 

Beautiful, isn't it?? :-)

In other words, every actor references all films that the actor is in...

And each of these films references all actors in the film...

And each of these actors references all films that the actor is in...

And each of these films references all actors in the film...

Etc, etc, etc, etc, etc.

I wonder how many levels deep this goes? The program doesn't hang so I 
assume that Flex puts a stop to it at some point...

Anyway, I'm assuming that the solution is to implement lazy 
associations. My understanding is that Hibernate does lazy associations 
by default, so once I set up my destinations properly all will be well. 
But despite several attempts, I keep getting error messages.

Could one of the Hibernate gurus that inhabits this list point me in the 
correct direction?

The DB's schema is outlined here:

http://www.brightwo

rks.com/technology/tech_questions/hibernate_lazy_associations/index.html 

And all relevant code, plus my latest error message, is here:

http://www.brightwo

rks.com/technology/tech_questions/hibernate_lazy_associations/code.txt 

I assume that my problem is in data-management-config.xml, but I'm new 
to all of this and could be doing other things wrong as well.

TIA!

Douglas

-

Douglas McCarroll

CairngormDocs.org Webmaster
http://www.Cairngor  mDocs.org

Flex Developer
http://www.brightwo  rks.com
617.459.3840

-




-- 
::| Carlos Rovira
::| http://www.carlosro  vira.com
::| http://www.madeinfl  ex.com 

 



Re: [flexcoders] How to implement Lazy Hibernate?

2006-11-26 Thread Douglas McCarroll
Hi Kelly,

 > Lazy Loading probably isn't going to help you.
 >
 > You probably want to consider doing an intermediate
 > class between any many-to-many associations in
 > hibernate so you have two many-to-one associations
 > instead.

Thanks for your response Kelly, but I think that I already have an 
intermediate class, implemented on both client (.as) and server (.java)

The FilmActor table has many-to-one relationships with both Film & Actor 
tables.

FilmActor.java & FilmActorVO.as are the intermediate classes that map to 
this table.

I'm guessing that you got the impression that I have no intermediate 
class from my explanation, right below the first link, which I 
oversimplified.

Here's a revised version:


Hi All,

I'm attempting to create a Cairngorm/FDMS/Hibernate/MySQL example 
program which I'll publish to the community once completed. I used the 
MySQL Sakila sample DB (pared down to 3 tables - Film, Actor & FilmActor 
- at present) and used HibernateTools to reverse engineer the requisite 
Java and Hibernate files. So far, so good. I've even managed to 
successfully write corresponding .as files and implement the beginnings 
of a Cairngorm front end.

And it works. Kind of.

The problem is that the persistence layer takes forever to load, even 
though the 3 tables only have hundreds or thousands of records each. 
I've temporarily pared them down considerably (to 100, 100 & 500 
records) and the program now loads quickly enough that I can continue 
development work, but the performance issue needs to be addressed.

It's fairly easy to see what the problem is. Here's a picture of the 
variable window that depicts the situation in all its glory:

http://www.brightworks.com/technology/tech_questions/hibernate_lazy_associations/deeply_nested_actors_and_films.jpg
 


Beautiful, isn't it??   :-)

There's a reference chain that goes like this on the client side:


ActorVO references...

A FilmActors ArrayCollection which contains...

ObjectProxy instances (translations of FilmActor.java) which reference...

Both ActorVO & FilmVO instances which both reference...

A FilmActors ArrayCollection which contains...

ObjectProxy instances (translations of FilmActor.java) which reference...

Both ActorVO & FilmVO instances which both reference...

Etc, etc, etc, etc, etc.


I wonder how many levels deep this goes? The program doesn't hang so I 
assume that Flex puts a stop to it at some point...

Anyway, I'm assuming that the solution is to implement lazy 
associations. My understanding is that Hibernate does lazy associations 
by default, so once I set up my destinations properly all will be well. 
But despite several attempts, I keep getting error messages.

Could one of the Hibernate gurus that inhabits this list point me in the 
correct direction?

The DB's schema is outlined here:

http://www.brightworks.com/technology/tech_questions/hibernate_lazy_associations/index.html
 


And all relevant code, plus my latest error message, is here:

http://www.brightworks.com/technology/tech_questions/hibernate_lazy_associations/code.txt
 


I assume that my problem is in data-management-config.xml, but I'm new 
to all of this and could be doing other things wrong as well.

TIA!


Douglas


-

Douglas McCarroll

CairngormDocs.org Webmaster
http://www.CairngormDocs.org

Flex Developer
http://www.brightworks.com
617.459.3840

-










Re: [flexcoders] DateFormatter adds one hour to output

2006-11-26 Thread Oliver Lietz
Am Donnerstag, 23. November 2006 17:24 schrieb Tom Chiverton:
> On Thursday 23 November 2006 12:27, Oliver Lietz wrote:
> > Is this desired behavior? Looks like a bug to me.
>
> Your timezone is +1, so I'd expect a 1h difference between locale time and
> UTC time.

Tom,

it was 13:26:20 (CET) on my Mac.

nowString: Thu Nov 23 13:26:20 GMT+0100 2006
looks good, matches my locale time.

utcString: Thu Nov 23 12:26:20 2006 UTC
looks good, matches UTC/GMT (CET-0100)

fromDate: 14:26:20
fromString: 14:26:20
fromLocaleString: 14:26:20
fromUTCString: 13:26:20

but these look bad. Why is the _Formatter_ adding one hour? The used method is 
format and not convert or addOneHourAndFormat.

Remember, output of first two is from simple toString()/toUTCString() and time 
looks fine - but output from Formatter is plus one hour. IMHO it's a problem 
with DateFormatter not Date or my timezone.

thanks,
O.






--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)

<*> To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 


Re: [flexcoders] DateFormatter adds one hour to output

2006-11-26 Thread Oliver Lietz
Am Freitag, 24. November 2006 02:23 schrieb Kevin Merritt:
> No bug. Your problems is right here:
> > timeFormatter.formatString = "HH:NN:SS";
>
> change this to:
>
> timeFormatter.formatString = "JJ:NN:SS";
>
> H - displays hours as 1 - 24
> J - displays hours as 0 - 23 (which is how most of us understand 24
> hr time.)
>
> This tripped me up as well on a recent project that I had to sync
> time code with a TV satellite truck.  It drove me crazy and I thought
> it was a bug as well.  What screwed me up is that I expected the
> pattern letters to be the same as PHP, but in some cases they differ.
>
> Hope that helps.
>
> - Kevin

OMG - thanks a lot Kevin, that solved my problem.

O.





--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)

<*> To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 


Re: [flexcoders] How to know when all data has been returned from a Remote Object Call?

2006-11-26 Thread Paul Hastings
On 11/26/06, jroblang <[EMAIL PROTECTED]> wrote:
> I have a situation where I need to make calls to two different remote objects 
> (ColdFusion
> queries) where one query depends on the results of the other.  Call 1 needs 
> to be
> completed before Call 2 can execute.  How do you figure out when Call 1 has 
> retrieved all
> its data, so that Call 2 can be processed?  Is some sort of event dispatched? 
>  I've tried

put call 2 in call 1's event handler.




Re: [flexcoders] best way to do database to Java to XML to flex

2006-11-26 Thread hank williams

Thanks alot. I actually spent the evening writing a xml to actionscript and
actionscript to xml converters. I am using mysql with jdbc and I dont think
there is any such capability with these tools. The interesting thing is
reading such xml is built into XMLDecode, which is an undocumented api for
parsing XML into actionscript. But its unclear what rules it uses to
determine how to convert such things as dates. In any case it didnt work
right because there was no way I could find to indicate that even though it
saw a number that I really wanted that number to be treated as a string.

Regards,
Hank

On 11/25/06, Flexy <[EMAIL PROTECTED]> wrote:


 Hello Hank,



Some DB's can return result sets in XML all by themselves. IIRC SQLServer
can do this. So middle tier is no longer an issue either..



Hope this helps,



Flexy.


 --

*From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
Behalf Of *hank williams
*Sent:* Sunday, November 26, 2006 12:57 AM
*To:* flexcoders@yahoogroups.com
*Subject:* [flexcoders] best way to do database to Java to XML to flex



I have been using remoting to get data out of my database and into flex.
The nice thing about this is it handles all the data conversion issues etc.
But now, I have a need to be able to communicate certain data in XML format.
I would imagine that there must be a clean process/format for communicating
between server and client in XML such that the datatypes and reserved
characters such as ",',>,<,& are handled.

what is the easiest way of doing this? Is there some XML database
communications standard which flex can read? Do people just roll their own
(ugh?). There must be a clean easy way to do this.

Hank





[flexcoders] How to know when all data has been returned from a Remote Object Call?

2006-11-26 Thread jroblang
Apologies if this question has been answered before, but I am a newbie to flex 
(and to web 
programming in general).  

I have a situation where I need to make calls to two different remote objects 
(ColdFusion 
queries) where one query depends on the results of the other.  Call 1 needs to 
be 
completed before Call 2 can execute.  How do you figure out when Call 1 has 
retrieved all 
its data, so that Call 2 can be processed?  Is some sort of event dispatched?  
I've tried 
executing call two after loading the data from Call 1 into an Array Collection, 
but it always 
results in the following error:

Cannot access a property or method of a null object reference.

which I assume is because the data returned hasn't yet been bound to the model. 
 

I can get the two calls to work when I manually dispatch the event (with a 
Button click) 
after I see the results returned from Call 1 in a datagrid, but this is not an 
ultimate 
solution, since this needs to happen without user input.

Any suggestions?  I'm completely befuddled.  If you need more info or want to 
see the 
code, let me know.  Thanks.





[flexcoders] validation for form reset

2006-11-26 Thread relisanhard52
Hi
I am having a form whose fields i can validate without any issues. I 
need to have an option of reset.
In my reset, i have

private function reset():void
{
nameValidator.enabled= false;

name.text='';

nameValidator.enabled= true;
}

This works fine when the user has input some text in name field and 
then resets it. But when user clicks reset without having entered in 
textinput, it shows the red outline with the error message on that 
field. I have pasted code above for just one field, obviously I have 
many other fields in the form.

Please advise how to successfully reset form, no matter if the user 
has input text in field or not. 

Regards
Husain




[flexcoders] Bug??? Re: Loading multiple swfs crashing browser

2006-11-26 Thread dallasweb
Adobe asked for my code regarding this issue. I have since posted it
on my blog. Also, I noticed another post on Adobe forum regarding the
'same' problem...browser crashes when loading swfs w/ swfloader

Take a peek...maybe it's something obvious.

http://www.missiondesign.net/yikes/index.cfm/2006/11/22/SWFLoader-Bug-Well-see

Thanks, Dallas

--- In flexcoders@yahoogroups.com, "dallasweb" <[EMAIL PROTECTED]> wrote:
>
> Maybe this is a possible bug in swfloader component. I've created some
> basic(no script) swf8 files and have loaded them dynamically into my
> Flex app using swfloader and no crash.
> 
> --- In flexcoders@yahoogroups.com, "dallasweb"  wrote:
> >
> > Daniel...thanks for the interest.
> > 
> > The content I'm loading are Captivate swf's.
> > 
> > For grins, I just made 5 swf's(Flash 8) with a large image embedded,
> > no script, one key frame each with the image. Still managed to crash
> > the browser.  
> > 
> > --- In flexcoders@yahoogroups.com, Daniel Wabyick  wrote:
> > >
> > > 
> > > Curious what is in the SWF content that you are loading. Is it AS3
> code 
> > > or AS2 code?
> > > 
> > > Wondering if you try loading completely basic Flash 8 SWF's
> without any 
> > > code if it will still crash.
> > > 
> > > Regards,
> > > -Daniel
> > > 
> > > 
> > > 
> > > dallasweb wrote:
> > > >
> > > > Matt..thanks for the reply. I changed the mx:Image tag to
> mx:SWFLoader
> > > > and while in debug mode I can see it unloading swfs at different
> > > > intervals. (wasn't doing that using mx:image) With that change to
> > > > swfloader it still crashes the browser.
> > > >
> > > > If I use mx:image and change the source dynamically, does that
> 'load'
> > > > the swf...or overwrite it with the newest selection? where only
> one is
> > > > 'loaded' at a time.
> > > >
> > > > --- In flexcoders@yahoogroups.com 
> > > > , "Matt Chotin" 
> wrote:
> > > > >
> > > > > Check to see if you're leaking memory (watch the task manager)
> > as you
> > > > > click through the movies? Maybe some old movies need to be
> unloaded
> > > > > explicitly?
> > > > >
> > > > >
> > > > >
> > > > > 
> > > > >
> > > > > From: flexcoders@yahoogroups.com 
> > > >  
> > > > [mailto:flexcoders@yahoogroups.com 
> > > > ] On
> > > > > Behalf Of dallasweb
> > > > > Sent: Tuesday, November 14, 2006 8:19 AM
> > > > > To: flexcoders@yahoogroups.com
> 
> > > > > Subject: [flexcoders] Loading multiple swfs crashing browser
> > > > >
> > > > >
> > > > >
> > > > > I really thought this would be easier than it has been. Maybe
> it is
> > > > > and I just can't see the forest yetanyway...thanks in
> > advance for
> > > > > your patience.
> > > > >
> > > > > I'm attempting to 'replicate' Jesse Wardens Captivate player in
> > Flex.
> > > > > It's not that I don't like your player Jesse...but our users
can't
> > > > > seem to figure out that they need to click a drop down to
> select new
> > > > > sections. Your player rocks.;)
> > > > >
> > > > > Here's what it looks like so far:
> > > > >
> > > > > I'm loading a XML doc using HTTPservice (myRequest.send(); gets
> > called
> > > > > on app init).
> > > > >  > fault="faultHandler()"
> > > > > result="resultHandler()" />
> > > > >
> > > > > resultHandler(): myDG.dataProvider =
> > > > > myRequest.lastResult.captivate_playlist.swf;
> > > > >
> > > > > Then I'm using a datagrid component to display available
captivate
> > > > > movies.
> > > > >
> > > > >  > > > > change="onDataGridChange(event)">
> > > > > 
> > > > >  > > > > headerText="Title" />
> > > > > 
> > > > > 
> > > > >
> > > > > When a user clicks a datagrid row, call onDataGridChange() which
> > does
> > > > > this:
> > > > > //
> > > > > swfDisplay.source = myDG.selectedItem.src;
> > > > >
> > > > > Which updates the source value of mx:image
> > > > >  > > > > scaleContent="true" id="swfDisplay" />
> > > > >
> > > > > There are no complie or runtime errors. When clicking
through the
> > > > > datagrid grid many times..(which users will
> > > > > do) the browser crashes...IE, Firefox, Safari, [MAC or XP]
> > > > >
> > > > > The way I set this up made since to me, but I'm a brand new Flex
> > > > > coder. Any insight is appreciated.
> > > > >
> > > >
> > > >
> > >
> >
>




RE: [flexcoders] best way to do database to Java to XML to flex

2006-11-26 Thread Flexy
Hello Hank,

 

Some DB's can return result sets in XML all by themselves. IIRC SQLServer
can do this. So middle tier is no longer an issue either..

 

Hope this helps,

 

Flexy.

 

  _  

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of hank williams
Sent: Sunday, November 26, 2006 12:57 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] best way to do database to Java to XML to flex

 

I have been using remoting to get data out of my database and into flex. The
nice thing about this is it handles all the data conversion issues etc. But
now, I have a need to be able to communicate certain data in XML format. I
would imagine that there must be a clean process/format for communicating
between server and client in XML such that the datatypes and reserved
characters such as ",',>,<,& are handled. 

what is the easiest way of doing this? Is there some XML database
communications standard which flex can read? Do people just roll their own
(ugh?). There must be a clean easy way to do this.

Hank

 



Re: [flexcoders] DataBinding Vs. Procedural Model Updates

2006-11-26 Thread Ralf Bokelberg

I guess that binding is more efficient, because it updates only the
properties, which change, while updateModel always updates everything.

Cheers,
Ralf.

On 11/26/06, Steve Hindle <[EMAIL PROTECTED]> wrote:


  Hi All,

Anyone know the performance implications of using databinding to
update a model vs an 'updateModel()' type call?

I can use basic databinding to bind a form to the model
(source="{foo.customer_name}") and databinding calls to bind
foo.customer_name back to the form control (so your model is updated
everytime a form field is updated). This has the advantage that your
model is always up to date with respect to the form - no extra
processing required.

I could also just use the basic databinding to bind the form controls
to the model, and an UpdateModel(m:Model) call to grab the contents of
all the fields and shove them back into the model. This requires an
extra function call to 'sync' the model with the form, but skips all
the event handling (for instance, if you update the 'customer_name'
control 3 times, you only update the model once at the end)

Anyone know how much of a load data binding/event processing puts on
the system with a moderately complicated app? I'm figuring 10-20
tables of 20-40 fields each. This is for a data entry app, so users
will be in all parts of the app all day long. Should I be looking at
un-binding models when they are not used/active (ie, if you switch
from clients to vendors, should I unbind the fields on the 'clients'
model ?)

steve
 





--
Ralf Bokelberg <[EMAIL PROTECTED]>
Flex & Flash Consultant based in Cologne/Germany


[flexcoders] Re: padding in the text in cells in a datagrid

2006-11-26 Thread Tim Hoff


-TH

--- In flexcoders@yahoogroups.com, arpan srivastava <[EMAIL PROTECTED]> 
wrote:
>
> Hi ,
> How to give padding to text in the cells. In my datagrid I have 
numbers which are right aligned, but they are too much right aligned, 
the text in last column touches the scroll bar. Can I have padding in 
the text?
>




Re: [flexcoders] How to implement Lazy Hibernate?

2006-11-26 Thread Carlos Rovira

Hi,

I'm currently searching for info about this topic. Could someone provide
some links about how FDS and Hibernate work thogether in this issue?

Thanks.

C.




On 11/26/06, Kelly <[EMAIL PROTECTED]> wrote:


   Lazy Loading probably isn't going to help you.



You probably want to consider doing an intermediate class between any
many-to-many associations in hibernate so you have two many-to-one
associations instead.







--Kelly








 --

*From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
Behalf Of *Douglas McCarroll
*Sent:* Saturday, November 25, 2006 3:32 PM
*To:* flexcoders@yahoogroups.com
*Subject:* [flexcoders] How to implement Lazy Hibernate?



Hi All,

I'm attempting to create a Cairngorm/FDMS/Hibernate/MySQL example
program which I'll publish to the community once completed. I used the
MySQL Sakila sample DB (pared down to 3 tables - Film, Actor & FilmActor
- at present) and used HibernateTools to reverse engineer the requisite
Java and Hibernate files. So far, so good. I've even managed to
successfully write corresponding .as files and implement the beginnings
of a Cairngorm front end.

And it works. Kind of.

The problem is that the persistence layer takes forever to load, even
though the 3 tables only have hundreds or thousands of records each.
I've temporarily pared them down considerably (to 100, 100 & 500
records) and the program now loads quickly enough that I can continue
development work, but the performance issue needs to be addressed.

It's fairly easy to see what the problem is. Here's a picture of the
variable window that depicts the situation in all its glory:


http://www.brightworks.com/technology/tech_questions/hibernate_lazy_associations/deeply_nested_actors_and_films.jpg

Beautiful, isn't it?? :-)

In other words, every actor references all films that the actor is in...

And each of these films references all actors in the film...

And each of these actors references all films that the actor is in...

And each of these films references all actors in the film...

Etc, etc, etc, etc, etc.

I wonder how many levels deep this goes? The program doesn't hang so I
assume that Flex puts a stop to it at some point...

Anyway, I'm assuming that the solution is to implement lazy
associations. My understanding is that Hibernate does lazy associations
by default, so once I set up my destinations properly all will be well.
But despite several attempts, I keep getting error messages.

Could one of the Hibernate gurus that inhabits this list point me in the
correct direction?

The DB's schema is outlined here:


http://www.brightworks.com/technology/tech_questions/hibernate_lazy_associations/index.html

And all relevant code, plus my latest error message, is here:


http://www.brightworks.com/technology/tech_questions/hibernate_lazy_associations/code.txt

I assume that my problem is in data-management-config.xml, but I'm new
to all of this and could be doing other things wrong as well.

TIA!

Douglas

-

Douglas McCarroll

CairngormDocs.org Webmaster
http://www.CairngormDocs.org

Flex Developer
http://www.brightworks.com
617.459.3840

-

 





--
::| Carlos Rovira
::| http://www.carlosrovira.com
::| http://www.madeinflex.com