[flexcoders] Flex Charting chart updated event?

2008-01-15 Thread Maciek
I need to update some UI elements when a chart receives new data from
its data provider and is done updating (specifically, it updates the new
minimums and maximums for its axes). I've looked at the Flex Charting
events, and I don't see anything like this. Anyone know of related
events I could listen for?

Thanks,
Maciek Sakrejda




Re: [flexcoders] resizing the whole movie or just the browser window in flex

2008-01-24 Thread Maciek
Best to get it straight from the source:

http://livedocs.adobe.com/flex/2/langref/flash/external/ExternalInterface.html


On Thu, 2008-01-24 at 12:53 -0500, Gustavo Duenas wrote:
> would you please explain me this external interface more in detail?
> 
> 
> 
> Regards
> 
> 
> 
> 
> Gustavo
> On Jan 24, 2008, at 12:44 PM, Sherif Abdou wrote:
> 
> > 
> > 
> > can't he just use ExternalInteface and use javaScript, there are
> > those popups that you can never resize or do anything with.
> > 
> > - Original Message 
> > From: Paul Andrews <[EMAIL PROTECTED]>
> > To: flexcoders@yahoogroups.com
> > Sent: Thursday, January 24, 2008 11:36:33 AM
> > Subject: Re: [flexcoders] resizing the whole movie or just the
> > browser window in flex
> > 
> > 
> > 
> > - Original Message -
> > From: Gustavo Duenas
> > To: [EMAIL PROTECTED] ups.com
> > Sent: Thursday, January 24, 2008 5:19 PM
> > Subject: [flexcoders] resizing the whole movie or just the
> > browser window in flex
> > 
> > 
> > Hi I have a flex app/website and its whole size doesn't get
> > or adapt to my screen size.
> > So I've just resize it in the main application and the
> > problem is when it is loaded looks ok, but sometimes , it
> > opens with a bigger size and instead of
> > being resized to that, appears a blank space outside the
> > application, there is a way to set the size to my browser
> > therefore it doesn't matter if you have this resized or not
> > to just have the size I wan it for ?
> >  
> > I'd just let the user decide how big they want the browser window to
> > be. A good trick is to make the html background match or at least
> > look similar to that of the application, so it looks right, with the
> > application floating centrally.
> >  
> > Paul
> > 
> > 
> > Regards
> > 
> > 
> > 
> > 
> > Gustavo
> > 
> > 
> > 
> > Gustavo A. Duenas
> > Creative Director
> > LEFT AND RIGHT SOLUTIONS
> > 904.  265 0330 - 904. 386 7958
> > www.leftandrightsol utions.com
> > Jacksonville - Florida
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > Be a better friend, newshound, and know-it-all with Yahoo!
> > Mobile. Try it now.
> > 
> > 
> 
> 
> 
> Gustavo A. Duenas
> Creative Director
> LEFT AND RIGHT SOLUTIONS
> 904.  265 0330 - 904. 386 7958
> www.leftandrightsolutions.com
> Jacksonville - Florida
> 
> 
> 
> 
> 
> 
> 
> 
>  




Re: [flexcoders] mxml loader

2008-01-24 Thread Maciek
I don't think this is possible, since MXML is actually compiled down to
ActionScript. I believe the closest you can come to this is have a web
service that will invoke the compiler and build mini-swfs (same mxml
that you were thinking of sending around, plus just enough skeleton code
to get it to compile), then send you the actual swfs. Then you can load
the swfs. This might not give you the performance you'd like, though...


On Thu, 2008-01-24 at 19:17 +, Ricardo Kirkner wrote:
> Hi there,
> 
> I am new to flex. I am trying to find out if there is a way to render
> mxml code dynamically at runtime.
> 
> What I want to achieve is to have a main mxml file that will fetch a
> mxml form definition (in the form of a string, for example) through a
> web service, and will then render the mxml code received.
> 
> I guess this would require to compile the mxml code received, and then
> embed the resulting sw(f|c) file into the main application.
> 
> Can anyone tell me if this is possible to do using Flex 2 SDK?
> 
> Thank you in advance,
> 
> Ricardo Kirkner
> 
> 
> 
> 
>  




Re: [flexcoders] Re: application exit event?

2008-02-24 Thread Maciek
Unfortunately, we can't help but litter in this situation: we open a
URLStream connection, and Flash Player (in Internet Explorer) does not
drop the connection when the corresponding URLStream object is destroyed
(I assume that it probably would drop the connection when GCing). This
is a Comet-style connection that must remain open while the Flex
application is running, so it's not something we can clean up "when
we're done" without having access to an application exit event. The user
killing the browser at any moment is not a problem for us, because in
that case, the connection is dropped properly.

I'll try Sherif's Javascript suggestion, although I was hoping there
would be something cleaner.

---
Maciek Sakrejda
Truviso, Inc.
http://www.truviso.com


On Sat, 2008-02-23 at 09:04 +, andrii_olefirenko wrote:
> as there are no finalizers nor destructors, the same goes for
> finishing the application. Don't litter, and there would be nothing to
> clean up :)
> It's important to keep in mind that a user could kill browser process
> any time, without waiting for you code to do anything.
> 
> Andrii Olefirenko
> 
> --- In flexcoders@yahoogroups.com, Maciek Sakrejda <[EMAIL PROTECTED]>
> wrote:
> >
> > I need to perform some cleanup when the user exits the application
> > (i.e., closes the page in which the application is embedded). Is
> there
> > an event I can listen for? I've tried Event.REMOVED,
> FlexEvent.REMOVE,
> > and Event.REMOVED_FROM_STAGE, but none of those seem to fire
> targetting
> > the actual application object. Any ideas?
> > -- 
> > Maciek Sakrejda
> > Truviso, Inc.
> > http://www.truviso.com
> >
> 
> 
> 
> 
>  




RE: [flexcoders] Re: What is the best way to compare two arrays element by element ignoring the o

2008-02-24 Thread Maciek
True. However, andrii's solution does amortize the cost of the
comparison across all array modifications, so you don't incur it all at
once when doing the comparison. Depending on the actual requirements of
the situation (and assuming you control array modifications, and are not
just trying to compare two arrays you've been handed out of the blue),
this may be a useful trick.

-- 
Maciek Sakrejda
Truviso, Inc.
http://www.truviso.com

On Sun, 2008-02-24 at 10:42 -0800, Gordon Smith wrote: 
> > Of course, modifying an array would become more expensive operation,
> but it's still O(1) operation
>  
> The overhead when modifying each element is O(1), so the total
> overhead you've incurred is O(n).
>  
> Gordon Smith
> Adobe Flex SDK Team
> 
> 
> __
> 
> From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED]
> On Behalf Of andrii_olefirenko
> Sent: Sunday, February 24, 2008 7:18 AM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Re: What is the best way to compare two arrays
> element by element ignoring the o
> 
> 
> 
> The trick is to keep hash value of all elements of the array.
> Prerequisites are following:
> 1. Hash function H(index, object) should return unique value for the
> object and the index of this object in the array (so two equal objects
> in different positions have different hash value, H(i, obj1) !=
> H(j,obj1) - this will force the order of elements).
> 2. On add/remove/modify operation, compute value h=f(h1, H(i, obj)),
> where h1 - old hash value for the array, f - composition function (XOR
> for example but could be something else). For empty array h1 equals
> some initial value (like 0).
> 
> Then to check if two arrays are equal you just need to compare h
> values of both arrays, which is O(1) operation.
> Of course, modifying an array would become more expensive operation,
> but it's still O(1) operation, so you basically eliminate all O(n)
> (loops over array of data)
> Of course, there could be more optimisation done if we knew more about
> particular requirements.
> 
> Andrii Olefirenko
> 
> --- In flexcoders@yahoogroups.com, "Gordon Smith" <[EMAIL PROTECTED]> wrote:
> >
> > Can you give more detail? I don't believe there is any O(1)
> algorithm
> > for this. O(1) means that comparing two 100,000-element arrays would
> > take the same time as comparing two 100-element arrays.
> > 
> > Gordon Smith
> > Adobe Flex SDK Team
> > 
> > 
> > 
> > From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED]
> On
> > Behalf Of andrii_olefirenko
> > Sent: Saturday, February 23, 2008 1:01 AM
> > To: flexcoders@yahoogroups.com
> > Subject: [flexcoders] Re: What is the best way to compare two arrays
> > element by element ignoring the o
> > 
> > 
> > 
> > if you are really concerned about performance I would recommend to
> > hash values added to the array into common hash and then comparing
> two
> > arrays would take only O(1) not O(n)
> > 
> > Andrii Olefirenko
> > 
> > --- In flexcoders@yahoogroups.com <mailto:flexcoders%
> 40yahoogroups.com>
> > , "Sergey Kovalyov"
> >  wrote:
> > >
> > > What is the best way to compare two arrays element by element
> > ignoring the
> > > order? My solution:
> > > 
> > > var differs : Boolean =
> > > (a.length != b.length) ||
> > > a.some(
> > > function(item : Object, index : int, array : Array) : Boolean {
> > > return (b.indexOf(item) == -1);
> > > });
> > > 
> > > May be the better solution exists?
> > >
> >
> 
> 
> 
> 
>  




Re: [flexcoders] Passing an email *subject* when opening email client?

2008-06-01 Thread Maciek
http://www.google.com/search?btnI=I&q=mailto+syntax


On Sun, 2008-06-01 at 00:01 -0700, JRBower wrote:
> 
> The function below works great for passing the email address but I'd
> like to
> also pass the subject also. Any ideas how to include the subject in
> this
> function?
> 
> private function launchMailer(e:Event):void
> { 
> var mailLink:URLRequest = new URLRequest("mailto://"; +
> e.currentTarget.label);
> navigateToURL( mailLink, "_self" );
> }
> 
> Thanks,
> James
> -- 
> View this message in context:
> http://www.nabble.com/Passing-an-email-*subject*-when-opening-email-client--tp17582920p17582920.html
> Sent from the FlexCoders mailing list archive at Nabble.com.
> 
> 
> 
> 
>  




Re: [flexcoders] Generating AS3 code from Java

2008-06-18 Thread Maciek
Indeed. Granite Data Services includes gas3 in recent versions, which
does exactly what you want. We've used it at Truviso on a small set of
objects, and it works quite well.
-- 
Maciek Sakrejda
Truviso, Inc.
http://www.truviso.com

On Thu, 2008-06-19 at 02:06 +, andrew. wrote:
> Hi, 
> 
> I am using a Flex UI talking to a Blaze DS / Java backend. The sever
> has a set of DTO 
> objects used for talking to Flex and other web services. 
> 
> Is there any open source tools out there to generate the AS3 code from
> Java? This should 
> be a fairly easy program to write using reflection, but someone must
> have done it before. 
> 
> 
> 
> 
>  




[flexcoders] flex 2/3 charting questions

2008-07-28 Thread Maciek
We need to build a Flex 2 project that uses Flex Charting. Is it
possible to download Flex Charting 2? All Adobe Flex Charting 2 links
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? We're not ready to update the project to Flex 3 yet (we hope
to do this very soon, but not immediately). Has anyone ran into similar
issues before? I know that boxed versions of FlexBuilder 2 are available
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.

Any advice would be greatly appreciated.

Thanks,
-- 
Maciek Sakrejda
Truviso, Inc.
http://www.truviso.com





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] FlexBuilder Linux

2008-03-26 Thread Maciek
There are five days remaining on my FlexBuilder alpha 2 trial. From what
I can see, there is still no version I can purchase. Will there be
another alpha or a beta (or a GA release) soon? If not, what can I do
when my trial expires?

-- 
Maciek Sakrejda
Truviso, Inc.
http://www.truviso.com




[flexcoders] layout question

2008-05-14 Thread Maciek
Hi. I've been doing a fair amount of Actionscript, and am now getting to
do some mxml layout. I

I have a component with a login control (this is the only child in the
component, and the parent is a VBox with width and height set to 100%):














This does what I expect for the form, (it has a margin of 10px), but the
button is clinging to the bottom left of the panel. I think I'm missing
something. Any suggestions?

-Maciek




Re: [flexcoders] Re: NativeWindow Error

2008-05-27 Thread Maciek
Actually, it's fairly common to leave out import statements in
programming book examples to save space. Just FYI, since you'll probably
run into this again.

-Maciek


On Wed, 2008-05-28 at 01:50 +, ibdwalrus wrote:
> --- In flexcoders@yahoogroups.com, "Tim Hoff" <[EMAIL PROTECTED]> wrote:
> >
> > wtf, meant to say import statement.
> > 
> > -TH
> > 
> > --- In flexcoders@yahoogroups.com, "Tim Hoff"  wrote:
> > >
> > > Hi Mike,
> > > 
> > > You're going to have to add an insert statement for the class:
> > > 
> > > import flash.display.NativeWindow;
> > > 
> > > -TH
> > > 
> > > --- In flexcoders@yahoogroups.com, "ibdwalrus"  wrote:
> > > >
> > > > I'm working through Rich Tretola's Beginning Adobe AIR book and 
> > I'm
> > > > stuck on the first NativeWindow example. The first variable 
> > > declaration
> > > > in the script block
> > > > 
> > > > private var nw1:NativeWindow;
> > > > 
> > > > is throwing the error 1046: Type was not found or was not a 
> > compile-
> > > time
> > > > constant: NativeWindow.
> > > > 
> > > > The code so far is this:
> > > > 
> > > > 
> > > >  xmlns:mx="http://www.adobe.com/2006/mxml";
> > > > layout="absolute">
> > > > 
> > > > 
> > > > 
> > > > 
> > > > 
> > > > What am I missing?
> > > > 
> > > > Thanks,
> > > > Mike
> > > >
> > >
> >
> Thanks so much, Tim. That worked like a champ. It looks like the
> publisher just failed to include that line in the example code. 
> What's funny is that I misread the typo in your original post as
> "import" and corrected the problem before reading your second post
> correcting it. :)
> 
> I appreciate your taking the time to help me.
> 
> Regards,
> 
> Mike
> 
> 
> 
> 
>  




Re: [flexcoders] JAXB for actionscript

2008-05-27 Thread Maciek
I'm not aware of anything, but you could try JAXB for XSD -> Java, and
then something like Granite Data Services' gas3 to go from Java ->
ActionScript. We've recently done someting similar (although, granted,
we actually wanted the Java code as well), and it worked reasonably
well...
-- 
Maciek Sakrejda
Truviso, Inc.
http://www.truviso.com

On Mon, 2008-05-26 at 11:51 +, gianlucavatinno wrote:
> hello to all,
> 
> I'm searching for program like JAXB (for java) that compiles xsd into
> actionscript 3 class.
> is there anything like that?
> 
> 
> 
> 
>  




Re: [flexcoders] Getting a Sprite into a Flex Container?

2006-12-31 Thread Maciek Wciślik
Hi,

> I got a class that extends Sprite that I want to put into a Flex
> DisplayObject container (Canvas or any similar custom made component). My
> question is:
> Is implementing the IUIComponent interface the only way to get this working
> or
> Are there any other ways around it? A SWFLoader is not what can use in this
> situation. Any hints would be appreciated.

You can place them on 


mx:Image id="spritelayer" x="0" y="0" scaleContent="false" 
autoLoad="true" />


then in as:

spriteLayer.addChild(mysprite);
etc.

works for me
br
maciek


[flexcoders] LCDS AMF call not firing result events, busy cursor does not go away

2008-01-11 Thread Maciek Sakrejda
I'm running into some odd Flex behavior, and I was wondering if anyone
had run into something similar before. Basically, it looks like my
RemoteObject result handlers are sometimes not being called. More
specifically, I have a remote object that corresponds to a Java class
which makes a jdbc call and returns some data. This remote object call
is invoked from a button and adds a new tab to a dashboard. The new tab
renders the results.

Most of the time, this works fine, but occasionally, the AMF call never
fires the handler (neither success nor failure), and the busy cursor
never goes away. I've double-checked to make sure that I register result
handlers before I invoke the method. The flashlog.txt file does not show
anything odd. A Java thread dump on the server does not show any
outstanding AMF calls being serviced, and if I re-try the same action,
it works fine (although the original tab still never gets any data). The
busy cursor remains until I close the client Flash object, but other
than that, the client behaves normally. I've verified that the event
listeners are being added before the remote call is made, but it almost
seems like a bigger issue: the busy cursor should go away as soon as the
result event is fired, whether I registered for it or not, right?

For what it's worth, I seem to hit this more frequently if I open a
burst of new tabs quickly one after another.

I'm using:
Java HotSpot(TM) Server VM (1.5.0_14-b03 mixed mode)
Adobe Flash Player 9,0,115,0 (debug)
Apache Tomcat 5.5.23
LCDS 2.5.1

Any thoughts?

Thanks,
-- 
Maciek Sakrejda
Truviso, Inc.
http://www.truviso.com




Re: [flexcoders] How do I set and get the date of a DateField?

2008-01-11 Thread Maciek Sakrejda
DateField.selectedDate?


-Original Message-
From: simonjpalmer <[EMAIL PROTECTED]>
Reply-To: flexcoders@yahoogroups.com
To: flexcoders@yahoogroups.com
Subject: [flexcoders] How do I set and get the date of a DateField?
Date: Fri, 11 Jan 2008 21:28:32 -

not normally stumped, but I can't figure out how to set the value of a
DateField from a Date and then do the reverse and get a Date object
from the DateField. I was expecting to have accessors which took Date
objects, but there aren't any. 

Do I have to do the whole thing via formatted text? 




 




Re: [flexcoders] Re: How do I set and get the date of a DateField?

2008-01-13 Thread Maciek Sakrejda
Hmm... I'm not sure if me pulling suggestions out of thin air is at all
helpful, but have you tried labelFunction and parseFunction? I don't see
why the default wouldn't work, but if there's a problem, you could use
these two to hack up a fix for your specific format (assuming you have a
specific format, and are not trying to parse dates with arbitrary format
strings).


-Original Message-
From: simonjpalmer <[EMAIL PROTECTED]>
Reply-To: flexcoders@yahoogroups.com
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: How do I set and get the date of a DateField?
Date: Fri, 11 Jan 2008 21:56:40 -

thanks! that seems to work as long as I have dd/mm/ or mm/dd/
as the formatString, otherwise it fails to parse and I seem to get a
zero date.

--- In flexcoders@yahoogroups.com, Maciek Sakrejda <[EMAIL PROTECTED]>
wrote:
>
> DateField.selectedDate?
> 
> 
> -Original Message-
> From: simonjpalmer <[EMAIL PROTECTED]>
> Reply-To: flexcoders@yahoogroups.com
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] How do I set and get the date of a DateField?
> Date: Fri, 11 Jan 2008 21:28:32 -
> 
> not normally stumped, but I can't figure out how to set the value of a
> DateField from a Date and then do the reverse and get a Date object
> from the DateField. I was expecting to have accessors which took Date
> objects, but there aren't any. 
> 
> Do I have to do the whole thing via formatted text?
>




 




Re: [flexcoders] Dash symbol on xml tag

2008-01-14 Thread Maciek Sakrejda
Assuming you have a variable called styles that references this file,
you can use

styles.style.["font-family"]

to access the XMLList with the single element font-family, or

styles.style.["font-family"][0]

to access the actual font-family element itself.


-- 
Maciek Sakrejda
Truviso, Inc.
http://www.truviso.com

-Original Message-
From: ruidsoares <[EMAIL PROTECTED]>
Reply-To: flexcoders@yahoogroups.com
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Dash symbol on xml tag
Date: Mon, 14 Jan 2008 08:53:39 -

Hi,

I have an xml file that has the following structure:



<font-family>Arial</font-family>
<font-weight>bold</font-weight>



I would like to know how can I reference the font-family tag using E4X?

Thanks,

Rui




 




Re: [flexcoders] LCDS AMF call not firing result events, busy cursor does not go away

2008-01-14 Thread Maciek Sakrejda
Ok, I suppose there may be no answer since this is not exactly a minimal
test case. Let me simplify the question:

Under what circumstances would a RemoteObject AMF call not restore the
cursor from the 'busy' state?

Relevant source:
override public function init():void {
// create service
_remote = new RemoteObject();
_remote.showBusyCursor = true;
_remote.destination = "fooService";
_remote.addEventListener("result", handleResultReceived);
_remote.addEventListener("fault", handleFault);

var params:Object = new Object();
for each (var f:Filter in _filterCollection.filters) {
if (f.isServerFilter) {
f.refreshValue();
params[f.field] = f.value;
}
}

_remote.executeStaticQuery(super._queryId, params,
super._serverTransformer);
 }

Again, this error is not consistently reproducible: it works most of the
time, but occasionally, the busy cursor never goes away, and neither the
result handler nor the fault handler get invoked.

I can understand that the handlers not getting invoked could be
something that I'm doing wrong, but why would the busy cursor stay? Any
suggestions?

Thanks,
-- 
Maciek Sakrejda
Truviso, Inc.
http://www.truviso.com

-Original Message-
From: Maciek Sakrejda <[EMAIL PROTECTED]>
Reply-To: flexcoders@yahoogroups.com
To: flexcoders@yahoogroups.com
Subject: [flexcoders] LCDS AMF call not firing result events, busy
cursor does not go away
Date: Fri, 11 Jan 2008 10:52:53 -0800

I'm running into some odd Flex behavior, and I was wondering if anyone
had run into something similar before. Basically, it looks like my
RemoteObject result handlers are sometimes not being called. More
specifically, I have a remote object that corresponds to a Java class
which makes a jdbc call and returns some data. This remote object call
is invoked from a button and adds a new tab to a dashboard. The new tab
renders the results.

Most of the time, this works fine, but occasionally, the AMF call never
fires the handler (neither success nor failure), and the busy cursor
never goes away. I've double-checked to make sure that I register result
handlers before I invoke the method. The flashlog.txt file does not show
anything odd. A Java thread dump on the server does not show any
outstanding AMF calls being serviced, and if I re-try the same action,
it works fine (although the original tab still never gets any data). The
busy cursor remains until I close the client Flash object, but other
than that, the client behaves normally. I've verified that the event
listeners are being added before the remote call is made, but it almost
seems like a bigger issue: the busy cursor should go away as soon as the
result event is fired, whether I registered for it or not, right?

For what it's worth, I seem to hit this more frequently if I open a
burst of new tabs quickly one after another.

I'm using:
Java HotSpot(TM) Server VM (1.5.0_14-b03 mixed mode)
Adobe Flash Player 9,0,115,0 (debug)
Apache Tomcat 5.5.23
LCDS 2.5.1

Any thoughts?

Thanks,
-- 
Maciek Sakrejda
Truviso, Inc.
http://www.truviso.com




 




RE: [flexcoders] LCDS AMF call not firing result events, busycursor does not go away

2008-01-14 Thread Maciek Sakrejda
Thanks a lot, Seth. Given that most of the time, this does work
correctly, it's most likely a network issue (for one reason or another),
right? Or can you think of other possible causes?

Thanks,
-- 
Maciek Sakrejda
Truviso, Inc.
http://www.truviso.com

-Original Message-
From: Seth Hodgson <[EMAIL PROTECTED]>
Reply-To: flexcoders@yahoogroups.com
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] LCDS AMF call not firing result events,
busycursor does not go away
Date: Mon, 14 Jan 2008 14:58:27 -0800

The busy cursor is set when a RemoteObject operation is invoked using
CursorManager.setBusyCursor(). It's removed when a result or fault for
the invocation is returned, via a call to
CursorManager.removeBusyCursor().

If you're not receiving a result or fault event, that would explain why
the busy cursor is not being unset.

RemoteObject, and the other RPC-related client components, define a
'requestTimeout' property that represents the number of seconds the
RemoteObject will wait for a response or fault from the server/network
before giving up and just faulting the call locally on the client. You
may want to enable this property, in order to abort requests that are
lost in the network (although this sort of failure should be very
intermittent and if it's common you should do more debugging or your
network to attempt to determine why the requests are dropping).

Best,
Seth


From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Maciek Sakrejda
Sent: Monday, January 14, 2008 9:37 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] LCDS AMF call not firing result events,
busycursor does not go away

Ok, I suppose there may be no answer since this is not exactly a minimal
test case. Let me simplify the question:

Under what circumstances would a RemoteObject AMF call not restore the
cursor from the 'busy' state?

Relevant source:
override public function init():void {
// create service
_remote = new RemoteObject();
_remote.showBusyCursor = true;
_remote.destination = "fooService";
_remote.addEventListener("result", handleResultReceived);
_remote.addEventListener("fault", handleFault);

var params:Object = new Object(); 
for each (var f:Filter in _filterCollection.filters) {
if (f.isServerFilter) {
f.refreshValue();
params[f.field] = f.value;
}
}

_remote.executeStaticQuery(super._queryId, params,
super._serverTransformer);
}

Again, this error is not consistently reproducible: it works most of the
time, but occasionally, the busy cursor never goes away, and neither the
result handler nor the fault handler get invoked.

I can understand that the handlers not getting invoked could be
something that I'm doing wrong, but why would the busy cursor stay? Any
suggestions?

Thanks,
-- 
Maciek Sakrejda
Truviso, Inc.
http://www.truviso.com

-Original Message-
From: Maciek Sakrejda <[EMAIL PROTECTED]>
Reply-To: flexcoders@yahoogroups.com
To: flexcoders@yahoogroups.com
Subject: [flexcoders] LCDS AMF call not firing result events, busy
cursor does not go away
Date: Fri, 11 Jan 2008 10:52:53 -0800

I'm running into some odd Flex behavior, and I was wondering if anyone
had run into something similar before. Basically, it looks like my
RemoteObject result handlers are sometimes not being called. More
specifically, I have a remote object that corresponds to a Java class
which makes a jdbc call and returns some data. This remote object call
is invoked from a button and adds a new tab to a dashboard. The new tab
renders the results.

Most of the time, this works fine, but occasionally, the AMF call never
fires the handler (neither success nor failure), and the busy cursor
never goes away. I've double-checked to make sure that I register result
handlers before I invoke the method. The flashlog.txt file does not show
anything odd. A Java thread dump on the server does not show any
outstanding AMF calls being serviced, and if I re-try the same action,
it works fine (although the original tab still never gets any data). The
busy cursor remains until I close the client Flash object, but other
than that, the client behaves normally. I've verified that the event
listeners are being added before the remote call is made, but it almost
seems like a bigger issue: the busy cursor should go away as soon as the
result event is fired, whether I registered for it or not, right?

For what it's worth, I seem to hit this more frequently if I open a
burst of new tabs quickly one after another.

I'm using:
Java HotSpot(TM) Server VM (1.5.0_14-b03 mixed mode)
Adobe Flash Player 9,0,115,0 (debug)
Apache Tomcat 5.5.23
LCDS 2.5.1

Any thoughts?

Thanks,
-- 
Maciek Sakrejda
Truviso, Inc.
http://www.truviso.com




 




Re: [flexcoders] Trouble with try/catch for loader error

2008-01-16 Thread Maciek Sakrejda
Ben,

Try registering with loader.contentLoaderInfo for the various load
events (especially IOErrorEvent.IO_ERROR) to see what could be going
wrong. Since the load is asynchronous, Flash may not be able to throw an
error immediately, so it has to dispatch an error event.

-- 
Maciek Sakrejda
Truviso, Inc.
http://www.truviso.com

-Original Message-
From: Ben Marchbanks <[EMAIL PROTECTED]>
Reply-To: flexcoders@yahoogroups.com
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Trouble with try/catch for loader error
Date: Wed, 16 Jan 2008 13:56:44 -

I am using Ely' SuperImage with the preload to cache feature.

I am having some through with loading one set of images to the cache
and not having much luck trapping the error.

The following try/catch is totally ignored - what am I doing wrong ?

here's a snippet
--

trace(" not in cache or inaccessible: creating new Loader");
loader = new Loader();

try{
loader.load(request);
}
catch(e:Error)
{
trace("loadResult="+e)
}
cachedItems.push(loader);
result = loader
--




 




Re: [flexcoders] Flex Charting chart updated event?

2008-01-16 Thread Maciek Sakrejda
I've looked into binding to the value of DateTimeAxis.maximum and
DateTimeAxis.minimum, but it looks like these are not being called when
the range is established. I assume that the DateTimeAxis class just
updates its private variables for max and min, without using the setters
and getters, so that the binding event is not fired (I have confirmed
that the bindings are firing correctly, just not when the actual minimum
and maximum is established) ... Any suggestions as to how to work around
this?

Thanks,
Maciek Sakrejda


-Original Message-
From: Maciek <[EMAIL PROTECTED]>
Reply-To: flexcoders@yahoogroups.com
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Flex Charting chart updated event?
Date: Tue, 15 Jan 2008 22:24:26 -0800

I need to update some UI elements when a chart receives new data from
its data provider and is done updating (specifically, it updates the new
minimums and maximums for its axes). I've looked at the Flex Charting
events, and I don't see anything like this. Anyone know of related
events I could listen for?

Thanks,
Maciek Sakrejda




 




Re: [flexcoders] Move effect

2008-01-16 Thread Maciek Sakrejda
Moving the component by an amount equal to its stage x-coordinate plus
its width (if moving left) or its stage y-coordinate plus its height (if
moving down) should do it, no?


-Original Message-
From: jovialrandor <[EMAIL PROTECTED]>
Reply-To: flexcoders@yahoogroups.com
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Move effect
Date: Wed, 16 Jan 2008 22:18:23 -

How can I specify any Flex component to move out of the screen if i do 
not know the screen resoluction of the end user beforehand?

Is there some Move value like '-1' that indicates to move out of any 
size screen?

Thanks




 




Re: [flexcoders] Re: E4X Namespace Issues...

2008-01-17 Thread Maciek Sakrejda
ns:Namespace = xml.namespace();
default xml namespace = ns;

Although since you're talking about the default namespace, this
shouldn't be necessary...

-- 
Maciek Sakrejda
Truviso, Inc.
http://www.truviso.com

-Original Message-
From: Todd <[EMAIL PROTECTED]>
Reply-To: flexcoders@yahoogroups.com
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: E4X Namespace Issues...
Date: Thu, 17 Jan 2008 16:02:49 -

Hello,
  I got it to work.  I had to change the e4x expression a little to get
it to work.  I needed to qualify the ID with the namespace.  So this
code works:


var xml:XML = new XML(inputXML.text);
var ns:Namespace = xml.namespace();
trace(xml.namespace());
var filterdXML:XMLList = new XMLList(xml..ns::folder.(ns::id ==
13));
outputXML.text = filterdXML.toXMLString();

Notice the ns:id == 13.

So, now that I got it working, I'd still like to get it working with the
following syntax so I dont have to add namespace aliases to my e4x:
private namespace ns="http://";
use namespace ns
Thanks for any suggestions on taking this further.

--- In flexcoders@yahoogroups.com, "Todd" <[EMAIL PROTECTED]> wrote:
>
> OK, I tried the following code and it's not working:
> 
> var xml:XML = new XML(inputXML.text);
> var ns:Namespace = xml.namespace();
> var filterdXML:XMLList = new XMLList(xml..ns::folder.(id == 13));
> outputXML.text = filterdXML.toXMLString();
> 
> But, if I add a prefix to the namespace declared in the XML, it all
> works.
>
xmlns:com="http://www.directTestmarketing.com/ws/schemas/communicationHi
\
> erarchyService">
> 
> ( added the :com).
> 
> I'm still not considering my situation fixed, though. I'd like to be
> able to get at the default namespace.
> 
> Thanks,
> Todd
> --- In flexcoders@yahoogroups.com, "fourctv" fourctv@ wrote:
> >
> > try this:
> >
> > var xml:XML = new XML(inputXML.text); // get the xml
> > var ns:Namespace = xml.namespace(); // extract
> the default namespace
> > trace('folder13:',xml..ns::folder.(id ==13)); // use it in the E4X
> expression
> >
> > hth
> > julio
> >
>



 




Re: [flexcoders] Error: Could not resolve to a component implementation.

2008-01-17 Thread Maciek Sakrejda
Try AnimateProperty (make sure to set its isStyle to true):

http://livedocs.adobe.com/labs/flex3/langref/mx/effects/AnimateProperty.html#includeExamplesSummary


-- 
Maciek Sakrejda
Truviso, Inc.
http://www.truviso.com

-Original Message-
From: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Reply-To: flexcoders@yahoogroups.com
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Error: Could not resolve  to a
component implementation.
Date: Thu, 17 Jan 2008 12:46:20 -0500

Thanks, but I want to change the size dynamically. I want the size to 
get larger and then smaller.

Sherif Abdou wrote:
>
> 
>
> 
>
>
>
> - Original Message 
> From: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
> To: flexcoders@yahoogroups.com
> Sent: Thursday, January 17, 2008 11:39:41 AM
> Subject: Re: [flexcoders] Error: Could not resolve  to
a 
> component implementation.
>
> And then how do I set the fontSize ?
> Error: Access of possibly undefined property fontSize through a
> reference with static type mx.controls: Label.
>
> Maciek Sakrejda wrote:
> >
> > Try .
> >
> > -Original Message-
> > From: [EMAIL PROTECTED] org <mailto:info1%40reenie.org> <mailto:info1% 
> 40reenie. org> <[EMAIL PROTECTED] org <mailto:info1%40reenie.org>
> > <mailto:info1% 40reenie. org>>
> > Reply-To: [EMAIL PROTECTED] ups.com 
> <mailto:flexcoders%40yahoogroups.com> <mailto:flexcoders% 
> 40yahoogroups. com>
> > To: [EMAIL PROTECTED] ups.com 
> <mailto:flexcoders%40yahoogroups.com> <mailto:flexcoders% 
> 40yahoogroups. com>
> > Subject: [flexcoders] Error: Could not resolve  to a
> > component implementation.
> > Date: Thu, 17 Jan 2008 12:18:08 -0500
> >
> > Is there no mxml TextField tag ?
> >
> > Error: Could not resolve  to a component
implementation.
> >  > x="350" y="100" >
> >
> > 
> >
> > I'm trying to make the word "correct" with a font size of 20
> >
> >
>
>
>
> --
> Be a better friend, newshound, and know-it-all with Yahoo! Mobile.
Try 
> it now. 
>
<http://us.rd.yahoo.com/evt=51733/*http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ%20>
 
>
> 




 




Re: [flexcoders] Error: Could not resolve to a component implementation.

2008-01-17 Thread Maciek Sakrejda
Ah, never mind: TextSprite is from a library I've been working with. But
a cursory glance at livedocs shows TextField, FlexTextField,
UITextField, Label, and Text. Wee!

-- 
Maciek Sakrejda
Truviso, Inc.
http://www.truviso.com

-Original Message-
From: Maciek Sakrejda <[EMAIL PROTECTED]>
Reply-To: flexcoders@yahoogroups.com
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Error: Could not resolve  to a
component implementation.
Date: Thu, 17 Jan 2008 09:42:04 -0800

My understanding is that TextField is an old (pre-Flex) Flash class. If
you're writing Flex (and especially mxml), you're better off sticking
with UI widgets from the mx.controls package.

I'll be the first to agree that the redundancy caused by having Flex UI
classes and old Flash UI classes side-by-side is a little confusing.
There's three different text-field-like classes just off the top of my
head: TextSprite, TextField, and Label...

-- 
Maciek Sakrejda
Truviso, Inc.
http://www.truviso.com

-Original Message-
From: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Reply-To: flexcoders@yahoogroups.com
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Error: Could not resolve  to a
component implementation.
Date: Thu, 17 Jan 2008 12:35:17 -0500

I'm curious, what is a TextField ?
http://www.adobe.com/livedocs/flex/2/langref/flash/text/TextField.html#setTextFormat()
Specifically, why is there is TextField class but no mxml TextField
tag ?

Maciek Sakrejda wrote:
>
> Try .
>
> -Original Message-
> From: [EMAIL PROTECTED] <mailto:info1%40reenie.org> <[EMAIL PROTECTED] 
> <mailto:info1%40reenie.org>>
> Reply-To: flexcoders@yahoogroups.com <mailto:flexcoders%
40yahoogroups.com>
> To: flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com>
> Subject: [flexcoders] Error: Could not resolve  to a
> component implementation.
> Date: Thu, 17 Jan 2008 12:18:08 -0500
>
> Is there no mxml TextField tag ?
>
> Error: Could not resolve  to a component implementation.
>  x="350" y="100" >
>
> 
>
> I'm trying to make the word "correct" with a font size of 20
>
> 




 




Re: [flexcoders] Error: Could not resolve to a component implementation.

2008-01-17 Thread Maciek Sakrejda
Try . 

-Original Message-
From: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Reply-To: flexcoders@yahoogroups.com
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Error: Could not resolve  to a
component implementation.
Date: Thu, 17 Jan 2008 12:18:08 -0500

Is there no mxml TextField tag ?

Error: Could not resolve  to a component implementation.






I'm trying to make the word "correct" with a font size of 20




 




Re: [flexcoders] Re: Date field with time

2008-01-17 Thread Maciek Sakrejda
> The whole component is kind of broken.
Can you be a little more specific?


-Original Message-
From: gur_sukh <[EMAIL PROTECTED]>
Reply-To: flexcoders@yahoogroups.com
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Date field with time
Date: Thu, 17 Jan 2008 15:56:46 -

Thanks for the reply,

dataChange is for data property only and doesn't work.

If i use valueCommit, i can't even click on the datechooser. The whole
component is kind of broken.

there should be some way to handle date time.

Any ideas, anyone...

jkaur

--- In flexcoders@yahoogroups.com, "Alex Harui" <[EMAIL PROTECTED]> wrote:
>
> Try valueCommit
> 
> 
> 
> 
> 
> From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED]
On
> Behalf Of Sherif Abdou
> Sent: Wednesday, January 16, 2008 10:13 PM
> To: flexcoders@yahoogroups.com
> Subject: Re: [flexcoders] Date field with time
> 
> 
> 
> try the dataChange event instead, i think
> 
> - Original Message 
> From: gur_sukh <[EMAIL PROTECTED]>
> To: flexcoders@yahoogroups.com
> Sent: Thursday, January 17, 2008 12:01:50 AM
> Subject: [flexcoders] Date field with time
> 
> Hi,
> 
> Need some help. Fiddling with datefield component.
> 
>  labelFunction= "formatDate" 
> selectedDate= "{model.sessionD ata.prodEndDate} "
> change="if (null != DateField(event. currentTarget) .selectedDate)
> model.sessionData. prodEndDate = 
> checkProdEndDate( DateField( event.currentTar get).selectedDat e)" 
> formatString= "MM/DD/ JJ:NN:SS"
> enabled="{dateHandl er.checkDate( model.sessionDat a.prodEndDate) }"
> editable="true" 
> width="160"/ >
> 
> this works fine when the user chooses the date from date chooser. but
> when the users edits the time the change event doesn't occur. Which
> event should be used to know that the text has changed.
> 
> Thanks
> jkaur
> 
> 
> 
> 
> 
> 
> 
> Never miss a thing. Make Yahoo your homepage.
> 
>




 




Re: [flexcoders] Error: Could not resolve to a component implementation.

2008-01-17 Thread Maciek Sakrejda
My understanding is that TextField is an old (pre-Flex) Flash class. If
you're writing Flex (and especially mxml), you're better off sticking
with UI widgets from the mx.controls package.

I'll be the first to agree that the redundancy caused by having Flex UI
classes and old Flash UI classes side-by-side is a little confusing.
There's three different text-field-like classes just off the top of my
head: TextSprite, TextField, and Label...

-- 
Maciek Sakrejda
Truviso, Inc.
http://www.truviso.com

-Original Message-
From: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Reply-To: flexcoders@yahoogroups.com
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Error: Could not resolve  to a
component implementation.
Date: Thu, 17 Jan 2008 12:35:17 -0500

I'm curious, what is a TextField ?
http://www.adobe.com/livedocs/flex/2/langref/flash/text/TextField.html#setTextFormat()
Specifically, why is there is TextField class but no mxml TextField
tag ?

Maciek Sakrejda wrote:
>
> Try .
>
> -Original Message-
> From: [EMAIL PROTECTED] <mailto:info1%40reenie.org> <[EMAIL PROTECTED] 
> <mailto:info1%40reenie.org>>
> Reply-To: flexcoders@yahoogroups.com <mailto:flexcoders%
40yahoogroups.com>
> To: flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com>
> Subject: [flexcoders] Error: Could not resolve  to a
> component implementation.
> Date: Thu, 17 Jan 2008 12:18:08 -0500
>
> Is there no mxml TextField tag ?
>
> Error: Could not resolve  to a component implementation.
>  x="350" y="100" >
>
> 
>
> I'm trying to make the word "correct" with a font size of 20
>
> 




 




Re: [flexcoders] Flex Charting chart updated event?

2008-01-17 Thread Maciek Sakrejda
Well, if anyone is interested, I was able to more-or-less get this to
work by overriding NumericAxis protected method adjustMinMax in a custom
axis implementation, and dispatching a custom event when the
computedMinimum or computedMaximum changed. Can anyone think of a
cleaner way of doing this?

By the way, my hat's off to Adobe for releasing the Flex Charting source
to those who buy a charting license. Being able to look through the
actual charting code was invaluable while trying to figure out a
solution.

-- 
Maciek Sakrejda
Truviso, Inc.
http://www.truviso.com


-Original Message-
From: Maciek Sakrejda <[EMAIL PROTECTED]>
Reply-To: flexcoders@yahoogroups.com
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Flex Charting chart updated event?
Date: Wed, 16 Jan 2008 14:51:41 -0800

I've looked into binding to the value of DateTimeAxis.maximum and
DateTimeAxis.minimum, but it looks like these are not being called when
the range is established. I assume that the DateTimeAxis class just
updates its private variables for max and min, without using the setters
and getters, so that the binding event is not fired (I have confirmed
that the bindings are firing correctly, just not when the actual minimum
and maximum is established) ... Any suggestions as to how to work around
this?

Thanks,
Maciek Sakrejda

-Original Message-----
From: Maciek <[EMAIL PROTECTED]>
Reply-To: flexcoders@yahoogroups.com
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Flex Charting chart updated event?
Date: Tue, 15 Jan 2008 22:24:26 -0800

I need to update some UI elements when a chart receives new data from
its data provider and is done updating (specifically, it updates the new
minimums and maximums for its axes). I've looked at the Flex Charting
events, and I don't see anything like this. Anyone know of related
events I could listen for?

Thanks,
Maciek Sakrejda




 




Re: [flexcoders] Flare For Flex

2008-01-18 Thread Maciek Sakrejda
Hi Kevin,

I've gotten flare to work in our Flex-based app. I'm still just
experimenting with it, but it works quite well. The main trick is to add
a Visualization instace to a UIComponent, and then add that UIComponent
to your Flex application (you can't add Visualization directly as a
child because it doesn't implement IUIComponent. I believe Jeff plans to
add (some) more Flex support, but looking at svn, he's focusing on the
data package right now.

-Maciek


-Original Message-
From: Kevin Aebig <[EMAIL PROTECTED]>
Reply-To: flexcoders@yahoogroups.com
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Flare For Flex
Date: Fri, 18 Jan 2008 12:31:44 -0600

Hey all,

 

Has anyone successfully used the Flare library inside of a Flex/Air
application yet? I know that it’s been compiled to .swc’s but I noticed
that within the source it uses the Flash based classes instead of the
Flex variations.

 

Thanks,

 

!k


 




Re: [flexcoders] flex profiling

2008-01-21 Thread Maciek Sakrejda
This sounds normal, yes. Some more memory will be used for each new
DisplayObject (each new Object of any kind, for that matter). It won't
be reclaimed until all the references to that object are gone, and the
GC sees fit to do a collection. It could be that you have stranded event
listeners or something somewhere causing a leak, but it's also likely to
be just normal behavior. If you want to find out for sure, read up on
Flash Player's memory management (e.g., here:
http://blogs.adobe.com/aharui/2007/03/garbage_collection_and_memory.html ).


-Original Message-
From: ezderman <[EMAIL PROTECTED]>
Reply-To: flexcoders@yahoogroups.com
To: flexcoders@yahoogroups.com
Subject: [flexcoders] flex profiling
Date: Sun, 20 Jan 2008 12:50:30 -

Hi,

Does anyone has tips or links of how to analyze flex profiling. I have
problem with my application. every time I am adding a component or
Module to my page, the memory usage in the profile indicates increase.
The memory usage does not go down. Even when when I am not interacting
with the application. It is only goes up as I am adding more Display
Object to my page. Is it normal? Does this indicate memory leak?

Thanks




 




Re: [flexcoders] Custom components toolbox - organise into subfolders

2008-01-21 Thread Maciek Sakrejda
We use the standard Flex/Java structure of a package/directory tree
based on company url: com.truviso.component.package.subpackage.so.on,
depending on how fine-grained we feel the package divisions should be.
It's a little deeply nested, but that's a minor inconvenience. It works
quite well for us, and it's a pretty standard practice, so it's probably
a good idea to stick with it.
-- 
Maciek Sakrejda
Truviso, Inc.
http://www.truviso.com

-Original Message-
From: hmmmbeer3 <[EMAIL PROTECTED]>
Reply-To: flexcoders@yahoogroups.com
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Custom components toolbox - organise into
subfolders
Date: Mon, 21 Jan 2008 01:29:06 -

Hi,

I'm pretty new to Flex, but am creating a whole lot of [specially 
plumbed] custom components.

My designer is now complaining that the Custom branch of the Components 
tree has too many items, that are not grouped logically. Is there a 
way to create subfolders or some other organisation of Custom 
components? I have looked at Namespaces, Packages and [Metadata] tags 
but cant see any way to do this.

TIA

Radek




 




Re: [flexcoders] WrapPanel?

2008-01-23 Thread Maciek Sakrejda
Josh, check out the FlowBox from FlexLib:

http://flexlib.googlecode.com/svn/trunk/examples/FlowBox/FlowBox_Sample.swf


-Original Message-
From: Josh Santangelo <[EMAIL PROTECTED]>
Reply-To: flexcoders@yahoogroups.com
To: flexcoders@yahoogroups.com
Subject: [flexcoders] WrapPanel?
Date: Tue, 22 Jan 2008 23:43:39 -

I'm looking for a Flex container that behaves similar to WPF's
WrapPanel.

http://msdn2.microsoft.com/en-us/library/system.windows.controls.wrappanel.aspx

"Positions child elements in sequential position from left to right,
breaking content to the 
next line at the edge of the containing box. Subsequent ordering happens
sequentially from 
top to bottom or from right to left, depending on the value of the
Orientation property."

The closest I can find is Tile, which would work if it determined its
number of rows and 
columns based on the size of its children and its parent, rather than
always trying to make a 
square.

Has anyone implemented something like this?

thanks,
-josh




 




Re: [flexcoders]

2008-02-01 Thread Maciek Sakrejda
Unfortunately, your only other option is magic. Well, technically, you
could reimplement a subset of RTMP by having User2 make a URLStream
request to the server, have the server keep the connection open and push
data as it gets changes from User1, and retrieve this on User2's machine
by listening to ProgressEvent.PROGRESS events fired by the stream as
data comes in. This is no small undertaking, though, and runs into a
couple of ugly issues.

-- 
Maciek Sakrejda
Truviso, Inc.
http://www.truviso.com

-Original Message-
From: Guilherme Defreitas Juraszek <[EMAIL PROTECTED]>
Reply-To: flexcoders@yahoogroups.com
To: flexcoders@yahoogroups.com
Subject: [flexcoders]
Date: Fri, 1 Feb 2008 09:08:25 -0200

Hey guys

 

My name is Guilherme and i`m from Brasil. I`m new in flex world but I
have a little question. 

Sorry about my English, its not good J

 

How I can make a auto refresh of data when this data is modified without
using RMTP  or calling a function to retrieve de data. For example

 

cid:image002.png@01C864B0.31F1A1C0

 

Obs: Technology = Flex + BlazeDS over JBOSS + Java

 

 

Tks

Guilherme

 


 




Re: [flexcoders] Embedding String Variable in dataprovider name

2008-02-01 Thread Maciek Sakrejda
I'm no e4xpert, but

dataProvider="{chartXML2.lastResult.[month].day}"

should do it.

-- 
Maciek Sakrejda
Truviso, Inc.
http://www.truviso.com

-Original Message-
From: brad.bueche <[EMAIL PROTECTED]>
Reply-To: flexcoders@yahoogroups.com
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Embedding String Variable in dataprovider name
Date: Fri, 01 Feb 2008 15:40:25 -

Really what I need to be able to do is insert the variable name in this:

dataProvider="{chartXML2.lastResult.month.day}"

I need to replace the "month" with a string variable name (i.e public
var monthName = "January";)

I also need to do the same for the categoryfield as it will not let me
do categoryfield=$String.

In PHP this is incredibly easy to do. You just say blah=$string . In
fact, in PHP you can embed variable names everywhere. Its very
powerful. For instance, in php, for the dataprovider issue above, i'd
just do

dataProvider="{chartXML2.lastResult.$StringName.day}"

and it'd work just fine. Whats the syntax for doing this in Flex? 




 




Re: RES: [flexcoders]

2008-02-01 Thread Maciek Sakrejda
Right, I believe that's not implemented. Alternately, you could take a
look at Granite Data Services, which just released 1.0 and does provide
a data push implementation, although I haven't used it and I  don't know
how compatible this is with RTMP. We are using GDS for AMF at Truviso,
and that has worked fine for us.

-- 
Maciek Sakrejda
Truviso, Inc.
http://www.truviso.com

-Original Message-
From: Guilherme Defreitas Juraszek <[EMAIL PROTECTED]>
Reply-To: flexcoders@yahoogroups.com
To: flexcoders@yahoogroups.com
Subject: RES: [flexcoders]
Date: Fri, 1 Feb 2008 16:02:47 -0200

Thanks Maciek

 

RTMP not is implemented in BlazeDS right? I Will study more about
blazeds to understand it.

 

Thanks 

 

De: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] Em
nome de Maciek Sakrejda
Enviada em: sexta-feira, 1 de fevereiro de 2008 15:25
Para: flexcoders@yahoogroups.com
Assunto: Re: [flexcoders]


 

Unfortunately, your only other option is magic. Well, technically, you
could reimplement a subset of RTMP by having User2 make a URLStream
request to the server, have the server keep the connection open and push
data as it gets changes from User1, and retrieve this on User2's machine
by listening to ProgressEvent.PROGRESS events fired by the stream as
data comes in. This is no small undertaking, though, and runs into a
couple of ugly issues.

-- 
Maciek Sakrejda
Truviso, Inc.
http://www.truviso.com

-Original Message-
From: Guilherme Defreitas Juraszek <[EMAIL PROTECTED]>
Reply-To: flexcoders@yahoogroups.com
To: flexcoders@yahoogroups.com
Subject: [flexcoders]
Date: Fri, 1 Feb 2008 09:08:25 -0200

Hey guys

My name is Guilherme and i`m from Brasil. I`m new in flex world but I
have a little question. 

Sorry about my English, its not good J

How I can make a auto refresh of data when this data is modified without
using RMTP or calling a function to retrieve de data. For example

cid:image002.png@01C864B0.31F1A1C0

Obs: Technology = Flex + BlazeDS over JBOSS + Java

Tks

Guilherme


 




RE: [flexcoders] Embedding String Variable in dataprovider name

2008-02-01 Thread Maciek Sakrejda
Ah, you're right. Sorry, I thought that would work. Try 

datProvider="{chartXML2.lastResult.child(month).day}"
-- 
Maciek Sakrejda
Truviso, Inc.
http://www.truviso.com

-Original Message-
From: Brad Bueche <[EMAIL PROTECTED]>
Reply-To: flexcoders@yahoogroups.com
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Embedding String Variable in dataprovider name
Date: Fri, 1 Feb 2008 13:32:14 -0500

Maciek,
 
Thanks for the quick reply.
 
That generates the following errors:
 
Syntax error: expecting rightparen before rightbrace. [Generated code
(use -keep to save):
1084: Syntax error: expecting identifier before leftbracket
1084: Syntax error: expecting rightparen before destination
 
I put a right paren before it just to see what would happen.  It got rid
of the errors! but it still didnt work :(
 
I was able to get categoryfield and title to accept the  ="{StringName}"
syntax though.   I even tried to replace the entire  dataprovider entry
with a stringname, like so:
 
dataprovider="{stringName]"
 
but that did not work either. 
 
There is a larger problem that led me down this path.  But I'll open
that in another thread as it would still be really cool to figure if I
could do what we are talking about in this thread.
 
brad

-Original Message-
From: flexcoders@yahoogroups.com
    [mailto:[EMAIL PROTECTED] On Behalf Of Maciek Sakrejda
Sent: Friday, February 01, 2008 12:34 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Embedding String Variable in
dataprovider name


I'm no e4xpert, but

dataProvider="{chartXML2.lastResult.[month].day}"
    
should do it.

-- 
Maciek Sakrejda
Truviso, Inc.
http://www.truviso.com

-Original Message-
From: brad.bueche <[EMAIL PROTECTED]>
Reply-To: flexcoders@yahoogroups.com
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Embedding String Variable in dataprovider
name
Date: Fri, 01 Feb 2008 15:40:25 -

Really what I need to be able to do is insert the variable name
in this:

dataProvider="{chartXML2.lastResult.month.day}"

I need to replace the "month" with a string variable name (i.e
public
var monthName = "January";)

I also need to do the same for the categoryfield as it will not
let me
do categoryfield=$String.

In PHP this is incredibly easy to do. You just say blah=
$string . In
fact, in PHP you can embed variable names everywhere. Its very
powerful. For instance, in php, for the dataprovider issue
above, i'd
just do

dataProvider="{chartXML2.lastResult.$StringName.day}"

and it'd work just fine. Whats the syntax for doing this in
Flex? 






 




RE: [flexcoders] Flex Builder 3 matching identifier highlighting

2008-02-06 Thread Maciek Sakrejda
It's probably on by default since otherwise most users probably would
not have found it. I happen to think it's a very useful feature, and my
machine is fast enough (or my project small enough) that performance is
not a problem.


-Original Message-
From: Jim Hayes <[EMAIL PROTECTED]>
Reply-To: flexcoders@yahoogroups.com
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Flex Builder 3 matching identifier
highlighting
Date: Wed, 6 Feb 2008 13:13:49 -

There’s a button with a tooltip of “mark occurences” on the toolbar.

You’d have to ask adobe as to why it’s on by default, I guess.

 

-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of m88e24
Sent: 06 February 2008 13:04
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Flex Builder 3 matching identifier highlighting

 

Probably posted by someone but I can't seem to find it using the 
keywords I use. But does anyone know how to disable the highlighting 
of matching identifiers. You know when you cursor is positioned on a 
piece of code, all occurences of that code are highlighted. Sort of 
automatic search. I can't find how to turn this feature off. 
It is annoying and makes the cursor movement unresponsive. Please 
tell me how to turn it off and why isn't it off by default.
Thanks



__
This communication is from Primal Pictures Ltd., a company registered in
England and Wales with registration No. 02622298 and registered office:
4th Floor, Tennyson House, 159-165 Great Portland Street, London, W1W
5PA, UK. VAT registration No. 648874577.

This e-mail is confidential and may be privileged. It may be read,
copied and used only by the intended recipient. If you have received it
in error, please contact the sender immediately by return e-mail or by
telephoning +44(0)20 7637 1010. Please then delete the e-mail and do not
disclose its contents to any person.
This email has been scanned for Primal Pictures by the MessageLabs Email
Security System.
__

 




Re: [flexcoders] Differences between MXML and ActionScript in setting event listeners?

2008-02-06 Thread Maciek Sakrejda
Jim,

I believe when you register event handlers via MXML, you need to use the
name of the event dispatched, not the name of the constant referencing
that name. In other words, I believe it should be



instead of 





-- 
Maciek Sakrejda
Truviso, Inc.
http://www.truviso.com

-Original Message-
From: bpjim <[EMAIL PROTECTED]>
Reply-To: flexcoders@yahoogroups.com
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Differences between MXML and ActionScript in
setting event listeners?
Date: Wed, 06 Feb 2008 16:51:05 -

I have a custom component (PlotControls.mxml). It inherits from
DisplayObject (via HBox), so my understanding is that it will support
event bubbling.

In it I have defined a 'viewChanged' event:


[Event(name="VIEW_CHANGED", type="flash.events.Event")]


public static const VIEW_CHANGED:String = "viewChanged";

In that component I also have some AS code which broadcasts that event
(notice that bubbling is TRUE):

private function viewSelectedHandler():void
{
dispatchEvent(new Event(PlotControls.VIEW_CHANGED, true));
}

-
Next, I have a parent component, which also inherits from
DisplayObject via HBox. In the parent component, I have created an
instance of the first (child) component:



I also have some initializer code in the parent component which adds
an event handler to the child component:

private function initComponent():void
{
plotControls.addEventListener(PlotControls.VIEW_CHANGED,
viewSelectedHandler);
}

And the handler code looks like this:

private function viewSelectedHandler(e:Event):void
{
var plotId:String = plotControls.getPlotId();
Alert.show('viewSelectedHandler(); plotId: '+plotId);
}

All of the code ABOVE works as expected: when the UI in the child
component dispatches the event, the parent component's event handler
is getting called.

-
On the other hand, I tried setting the event listener directly on the
child component itself via the MXML markup (and removed the
addListener call from the parent's initializer):



Note: the Flex Builder IDE is showing me 'code completion' information
for the VIEW_CHANGED event, so I think that I have the right syntax
here, at least.

BUT THIS DOESN'T WORK! (The event handler is never invoked.)

*** My Question: why does the event handler, viewSelectedHandler(),
for the VIEW_CHANGED event NEVER get called when I add the listener
directly via the MXML markup? My understanding of Flex is that these
two approaches should yield the same results (though using
addListener() gives you more options.

What am I overlooking here--this one has me stumped. Could someone
please give me a clue?

Thanks in advance,
Jim




 




Re: [flexcoders] Re: private constructor in action script

2008-02-07 Thread Maciek Sakrejda
Determined users can still pass null to the constructor, no? We're
currently throwing an exception if the singleton exists and its
constructor is invoked, but I suppose this approach is a little cleaner.
-- 
Maciek Sakrejda
Truviso, Inc.
http://www.truviso.com

-Original Message-
From: m.ar80 <[EMAIL PROTECTED]>
Reply-To: flexcoders@yahoogroups.com
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: private constructor in action script
Date: Thu, 07 Feb 2008 05:41:03 -

As of now, it is not possible to declare a constructor private (other
than public) in ActionScript 3.0. However, as pointed out, it is
possible to achieve the required behavior by using a dummy private
class defined outside the package so that no one has access to it
outside the file. Passing a dummy instance of this class to the
constructor of the singleton class should prevent other users from
instantiating the singleton class. Here is a code snippet illustrating
the concept:

package
{
class Singleton
{
private static var theOneAndOnlyInstance:Singleton;

public function Singleton(dummy:DummyPrivateClass)
{
super();
}

public static function getInstance():Singleton
{
if(theOneAndOnlyInstance == null)
{
theOneAndOnlyInstance = new Singleton(new DummyPrivateClass());
}
return theOneAndOnlyInstance;
}
}
}

class DummyPrivateClass
{
public function DummyPrivateClass() { super(); }
}

HTH.




 




Re: [flexcoders] Adobe People, Save me from Silverlight! (Microsoft's Legal Record)

2008-02-13 Thread Maciek Sakrejda
Exactly (even if the term 'FUD' has become a little diluted). Jon
attacked Robert's comments on Microsoft's past as irrelevant to the
discussion of the technology, but they certainly are relevant. Even if
"almost every software company is guilty of that in some manner or
another", Microsoft is in a unique position, given its market
penetration, to be much more guilty of this than anyone else. As someone
picking a technology for an important project, it would be foolish to
ignore this (not that this should control the decision, but it should be
considered as a factor).


-Original Message-
From: Tom Chiverton <[EMAIL PROTECTED]>
Reply-To: flexcoders@yahoogroups.com
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Adobe People, Save me from Silverlight!
(Microsoft's Legal Record)
Date: Wed, 13 Feb 2008 16:27:35 +

On Wednesday 13 Feb 2008, Jon Bradley wrote:
> whatever. If the technology is good, clients demand it and it makes
> money, I use it.

What worries me is that when MS technology *isn't* good, clients still demand 
it because MS has FUD'ed them to death.





Re: [flexcoders] Moving Screen Control back and forth between components

2008-02-13 Thread Maciek Sakrejda
Have you considered the ViewStack component? It's hard to say without
knowing more about your setup, but it sounds like the right approach for
your problem.

-- 
Maciek Sakrejda
Truviso, Inc.
http://www.truviso.com

-Original Message-
From: Brad Bueche <[EMAIL PROTECTED]>
Reply-To: flexcoders@yahoogroups.com
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Moving Screen Control back and forth between
components
Date: Wed, 13 Feb 2008 13:35:14 -0500

I'm doing a charting application that allows the user multiple ways to
look at the data (both from a time hierarchy perspective as well as a
line of business organizational perspective).
 
My current problem is that when I drill down from the main (i.e. year
level view) component, say to a month component,  how do I get back the
main component.  I can move around within 1 component (applying
different chart types to the same set of data) using includeinlayout and
visible.
 
In fact, to get to a sublevel component I just turn off the other
components and make that one (includeinlayout and visible).  But now
control has passed to the sub-component and I dont know how to get back.
You cant turn off the component that you are currently in can you?  I
tried states but I find the includelayout and visible a lot more
straightforward to work with.  But I guess I can go back to states if
that is what is required here.
 
thanks
brad
 
 
 




Re: [flexcoders] Help with RegEx

2008-02-14 Thread Maciek Sakrejda
Unfortunately, you've hit an ugly problem for regex, Marty. Check out
the section on "Difficulties and Impossibilities" from "Mastering
Regular Expressions" at
http://www.oreilly.com/catalog/regex/chapter/ch04.html

"In fact, the problem is that you simply can't match arbitrarily nested
constructs with regular expressions. It just can't be done.

You can construct a regular expression that matches nested constructs up
to a certain depth, but not to any arbitrary level of nesting. A regular
expression to allow just one level of nesting is the monstrosity
\([^()]*(\([^()]*\)[^()]*)*\)..., so the thought of having to worry
about further levels of nesting is frightening. Sometimes, you just have
to use other, non-regex methods."

-- 
Maciek Sakrejda
Truviso, Inc.
http://www.truviso.com

-Original Message-
From: marty.pitt <[EMAIL PROTECTED]>
Reply-To: flexcoders@yahoogroups.com
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Help with RegEx
Date: Thu, 14 Feb 2008 13:22:08 -

Hi

Can someone please give me a hand on a RegEx? (I can't work these
things out for the life of me).

I'm basically trying to return nested groups inside delimeters.

An example we're all famililar with is the simple package / class
structure in Flex:

package foo {
class bar {
function stuff {
...
}
}
}
Given the delimeters oof { and }, I want to be able to return:
function stuff {
...
}

As well as 

class bar {
function stuff {
...
}
}

etc., up the chain.

I currently have the following regex working:

{\d*?\D*?}

Which works fine without nesting. As soon as you introduce nested
elements, it all gets a bit messy.

any help would be greatly appreciated.

Cheers

Marty




 




Re: [flexcoders] Eclipse Crashes in Flex Development perspective

2008-02-14 Thread Maciek Sakrejda
Give Eclipse more memory: edit eclipse.ini and up the limits.

Mine is currently

-vmargs
-Xms128m
-Xmx512m
-XX:PermSize=128M
-XX:MaxPermSize=256M

I can't tell you exactly what these mean (or if they're all necessary)
since I forgot the meanings of the various options since I changed them,
but a list archives (or google) search should give you more details.



-Original Message-
From: Amit Gupta <[EMAIL PROTECTED]>
Reply-To: flexcoders@yahoogroups.com
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Eclipse Crashes in Flex Development perspective
Date: Thu, 14 Feb 2008 20:53:18 -

Hello,

I have Eclipse 3.2 with Flex builder 2 installed on it. Our project is 
a combination of Flex and Java. 

The Java/J2EE perspective works just fine but when I am in Flex 
Development perspective trying to work on a AS or MXML file, Eclipse 
invariably crashes with out of memory message.

Is there a fix for this? I have tried to increase memory for eclipse 
but doesn't help.

Regards,
Amit Gupta




 




Re: [flexcoders] Supporting both double and single click events for TileList

2008-02-20 Thread Maciek Sakrejda
Right. If a double-click occurs, you'll get the single-click behavior as
well. What you want to do is add a listener for the single click that
starts a timer for a function that will execute the single-click
behavior in n milliseconds. If a second click occurs, cancel the timer.
The double-click event handler will be invoked normally. I've seen
examples around, but a quick search did not turn up what I was thinking
of. I'm sure you can find a relevant example with a little
investigation.

Note that this (necessarily) introduces a slight delay for the
single-click behavior. As long as you keep this under 300-500 ms, it
should be barely noticeable for your application.


-- 
Maciek Sakrejda
Truviso, Inc.
http://www.truviso.com

-Original Message-
From: Greg <[EMAIL PROTECTED]>
Reply-To: flexcoders@yahoogroups.com
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Supporting both double and single click events for
TileList
Date: Wed, 20 Feb 2008 14:20:44 -0500

Hi All,

 

I have a photo gallery on my site (TileList of thumbnails) and I am
having problems with double click events when employing click event.  I
would like to support the events as follows:

 

- ItemClick, open image popup window with image slightly larger
than thumbnail

- ItemDoubleClick, open image popup window with large view say
800x600

 

The ItemClick event happens before the double click and it displays a
popup over the selected item. It seems impossible to catch the double
click the way I am trying to implement it using both (itemClick and
itemDoubleClick events). It feels like I need to catch a generic
‘change’ event, inspect how many mouse clicks occurred and proceed
accordingly. 

 

Is this possible? 

 

Thanks,


Greg


 




Re: [flexcoders] Question reg. flex + webservices

2008-02-20 Thread Maciek Sakrejda
Yes, you'll need an event listener to handle the result of the web
service call (unless, of course, the web service call does not return
any data but merely has some effect on the server). If you can post the
code you're having trouble with, perhaps we can help.
-- 
Maciek Sakrejda
Truviso, Inc.
http://www.truviso.com

-Original Message-
From: cool buddy <[EMAIL PROTECTED]>
Reply-To: flexcoders@yahoogroups.com
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Question reg. flex + webservices
Date: Wed, 20 Feb 2008 13:37:49 -0800 (PST)


HI All,

For webservices to work with flex..do we need to an event listener.
Because i am writing an action script where i am calling the webservice
method it does n't work..so wondering whether we need to write the event
listener.

If any knows please post it.

Thanks,




Looking for last minute shopping deals? Find them fast with Yahoo!
Search.


 




Re: [flexcoders] Am I the only one who trace like this?

2008-02-21 Thread Maciek Sakrejda
You may also want to consider the Thunderbolt library:

http://code.google.com/p/flash-thunderbolt/

While peppering your code with trace statements is probably not a great
idea, a well-thought out logging system can be very helpful.

Disclaimer: I haven't used Thunderbolt yet, but I've been meaning to
look into it. Our project does use log4j, a similar framework for Java,
pretty extensively.
-- 
Maciek Sakrejda
Truviso, Inc.
http://www.truviso.com

-Original Message-
From: cmalartre <[EMAIL PROTECTED]>
Reply-To: flexcoders@yahoogroups.com
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Am I the only one who trace like this?
Date: Wed, 20 Feb 2008 21:53:16 -

Dear pro-coders,

I would like to know if you trace like this all your function:

public function deleteNote(uid:String):void {
trace("SQLiteDb.as - deleteNote() - uid: " + uid)

(...)
}

I find it very usefull in conjunction with the Flex Console or a
custom debugging Window. I admit my style is very verbose.

1) Do you trace like this

2) If you have alternatives ways of getting the same information, what
are they? I did not try to watch the stack too much.

3) If it's popular, is there a way to automate it? I do a lot of
typing error when I copy-paste these. It takes too much time. I'm
imagining a kind of script just before the compiling.

Thanks
Carl




 




[flexcoders] flex 2 charts: multiple axes

2008-02-21 Thread Maciek Sakrejda
I'm trying to figure out the behavior of Flex 2 charts with multiple
axes. I've read this in the docs:

By default, all charts that are subclasses of CartesianChart
display a single set of data, and single horizontal and vertical
axes. Setting any of the secondary properties, such as
secondDataProvider, secondSeries,
secondVerticalAxis/secondHorizontalAxis, or
secondVerticalAxisRenderer/secondHorizontalAxisRenderer, has the
following effect on the chart:

ColumnChart, LineChart, and AreaChart controls Primary and
secondary series share the horizontalAxis by default, but each
get a separate LinearAxis for their verticalAxis. A second
verticalAxisRenderer is created by default when using multiple
axes.

BarChart controls Primary and secondary series share the
verticalAxis, but by default, each has a separate
horizontalAxis. Two horizontalAxisRenderers are created by
default.

PlotChart and BubbleChart controls Primary and secondary series
have separate horizontal and vertical axes, and all four axis
renderers. Bubble charts continue to share a single radialAxis
among all series.

CartesianChart controls Cartesian charts have no extra axes or
axis renderers by default. 

PieChart controls Secondary series are not supported.

Use the  tag to specify an Array of series
objects that are rendered by using other scales. Any fields
applied to series in this array refer to fields on the
secondDataProvider.

However, I don't understand what the default behavior is when adding
secondSeries, secondHorizontalAxis, and secondVerticalAxis to a
CartesianChart. Specifically, I'm trying to figure out the "axis
affinity" of series added to the secondSeries array, and whether I can
manipulate this. As far as I can tell, a series added to the
secondSeries array uses the (first) horizontalAxis and the
secondVerticalAxis. Is this always the case? Is there any way to control
this behavior? I know that Flex 3 makes multi-axis work easier, but I
need to figure out Flex 2 behavior right now.

Thanks,
-- 
Maciek Sakrejda
Truviso, Inc.
http://www.truviso.com




Re: [flexcoders] flex version of html float?

2008-02-22 Thread Maciek Sakrejda
Jerry, check out the FlowBox container from FlexLib:

http://flexlib.googlecode.com/svn/trunk/examples/FlowBox/FlowBox_Sample.swf
http://code.google.com/p/flexlib/

I haven't actually used it for adjusting layout when resizing: we need
to handle layout of a varying set of children of different sizes. It
does have some quirks, but it works reasonably well.

A friend also suggested Eric Cancil's FlowContainer:

http://blog.3r1c.net/?p=89

I have not tried it yet, but have been meaning to.
-- 
Maciek Sakrejda
Truviso, Inc.
http://www.truviso.com

-Original Message-
From: Jerry DuVal <[EMAIL PROTECTED]>
Reply-To: flexcoders@yahoogroups.com
To: flexcoders@yahoogroups.com
Subject: [flexcoders] flex version of html float?
Date: Thu, 21 Feb 2008 18:21:51 -0500

I have a HBox that contains form items.  When the window is resized to a
smaller window flex automatically places the horizontal scroll bar.  Is
there any way to float the items to the next line instead of having the
scroll bar.  

 

















































































 

Jerry DuVal

Pace Systems Group, Inc.

800.624.5999

www.Pace2020.com

 


 




Re: [flexcoders] What is the best way to compare two arrays element by element ignoring the order?

2008-02-22 Thread Maciek Sakrejda
Extra points for higher-order function, although that is going to be
O(n^2) (unless Array.indexOf() has a weird implementation). If you've
got really, really big arrays (or are doing this in a tight loop) and
you have O(n) memory to spare, you could consider building a hashmap of
the values in Array a, and then walking Array b and checking if each
element is in the hashmap:

var differs:Boolean = (a.length != b.length);
if (!differs) {
  var aContents = new Object();
  a.forEach(function(item:Object, index:int, array:Array):void {
aContents[item] = true;
  });
  differs = b.some(function(item:Object, index:int, array:Array):Boolean
{
return aContents[item] == null;
  });
}

For small-ish arrays, though, I would expect your solution to be faster
than mine (I won't define 'small-ish', since I would honestly be pulling
a number out of my--err, out of thin air).

Also, neither your solution nor mine handles the case where the same
item is in one array twice (yours fails for dupes in a and mine for
dupes in b).

-- 
Maciek Sakrejda
Truviso, Inc.
http://www.truviso.com

-Original Message-
From: Sergey Kovalyov <[EMAIL PROTECTED]>
Reply-To: flexcoders@yahoogroups.com
To: flexcoders@yahoogroups.com
Subject: [flexcoders] What is the best way to compare two arrays element
by element ignoring the order?
Date: Fri, 22 Feb 2008 15:37:56 +0200

What is the best way to compare two arrays element by element ignoring
the order? My solution:

var differs : Boolean =
 (a.length != b.length) ||
 a.some(
  function(item : Object, index : int, array : Array) : Boolean {
   return (b.indexOf(item) == -1);
  });

May be the better solution exists?


 




Re: [flexcoders] flex version of html float?

2008-02-22 Thread Maciek Sakrejda
Eric,

I looked at the source, and it seems like your container does not
support horizontalAlign="center" and verticalAlign="middle" (unless I'm
missing something). Any chance of adding that support? It's the main
thing keeping us with the FlowBox from FlexLib. If you're not interested
in adding that support, would you accept a patch (I can't guarantee I'll
have time to actually implement this, but my company is certainly
interested in a better flow container)?

Thanks,
-- 
Maciek Sakrejda
Truviso, Inc.
http://www.truviso.com

-Original Message-
From: Eric Cancil <[EMAIL PROTECTED]>
Reply-To: flexcoders@yahoogroups.com
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] flex version of html float?
Date: Fri, 22 Feb 2008 11:36:24 -0500

Hi, I have created a flow container component that fixed a lot of the
bugs that existed in the one that existed in FlexLib - you can find it
at http://blog.3r1c.net/?p=89




On Fri, Feb 22, 2008 at 11:07 AM, Maciek Sakrejda
<[EMAIL PROTECTED]> wrote:
Jerry, check out the FlowBox container from FlexLib:




http://flexlib.googlecode.com/svn/trunk/examples/FlowBox/FlowBox_Sample.swf

http://code.google.com/p/flexlib/


I haven't actually used it for adjusting layout when resizing:
we need
to handle layout of a varying set of children of different
sizes. It
does have some quirks, but it works reasonably well.

A friend also suggested Eric Cancil's FlowContainer:

http://blog.3r1c.net/?p=89

I have not tried it yet, but have been meaning to.
-- 
Maciek Sakrejda
Truviso, Inc.
http://www.truviso.com



-Original Message-
From: Jerry DuVal <[EMAIL PROTECTED]>
Reply-To: flexcoders@yahoogroups.com
To: flexcoders@yahoogroups.com
Subject: [flexcoders] flex version of html float?
Date: Thu, 21 Feb 2008 18:21:51 -0500

I have a HBox that contains form items. When the window is
resized to a
smaller window flex automatically places the horizontal scroll
bar. Is
there any way to float the items to the next line instead of
having the
scroll bar. 

















































































Jerry DuVal

Pace Systems Group, Inc.

800.624.5999

www.Pace2020.com




 




[flexcoders] Re: What is the best way to compare two arrays element by element ignoring the o

2008-02-22 Thread Maciek Sakrejda
I don't believe that will do it, since the arrays aren't actually equal:
I believe Arrays (for the purposes of object comparison) are only equal
if they contain the same elements in the same order.

-- 
Maciek Sakrejda
Truviso, Inc.
http://www.truviso.com

-Original Message-
From: Scot <[EMAIL PROTECTED]>
To: Maciek Sakrejda <[EMAIL PROTECTED]>
Subject: Re: What is the best way to compare two arrays element by
element ignoring the o
Date: Fri, 22 Feb 2008 19:10:17 -

Would ObjectUtil.compare(object1, object2); do the job?

http://livedocs.adobe.com/flex/2/langref/mx/utils/ObjectUtil.html#compare()



--- In flexcoders@yahoogroups.com, Maciek Sakrejda <[EMAIL PROTECTED]> wrote:
>
> Extra points for higher-order function, although that is going to be
> O(n^2) (unless Array.indexOf() has a weird implementation). If you've
> got really, really big arrays (or are doing this in a tight loop) and
> you have O(n) memory to spare, you could consider building a hashmap of
> the values in Array a, and then walking Array b and checking if each
> element is in the hashmap:
> 
> var differs:Boolean = (a.length != b.length);
> if (!differs) {
>   var aContents = new Object();
>   a.forEach(function(item:Object, index:int, array:Array):void {
> aContents[item] = true;
>   });
>   differs = b.some(function(item:Object, index:int, array:Array):Boolean
> {
> return aContents[item] == null;
>   });
> }
> 
> For small-ish arrays, though, I would expect your solution to be faster
> than mine (I won't define 'small-ish', since I would honestly be pulling
> a number out of my--err, out of thin air).
> 
> Also, neither your solution nor mine handles the case where the same
> item is in one array twice (yours fails for dupes in a and mine for
> dupes in b).
> 
> -- 
> Maciek Sakrejda
> Truviso, Inc.
> http://www.truviso.com
> 
> -Original Message-
> From: Sergey Kovalyov <[EMAIL PROTECTED]>
> Reply-To: flexcoders@yahoogroups.com
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] What is the best way to compare two arrays element
> by element ignoring the order?
> Date: Fri, 22 Feb 2008 15:37:56 +0200
> 
> What is the best way to compare two arrays element by element ignoring
> the order? My solution:
> 
> var differs : Boolean =
>  (a.length != b.length) ||
>  a.some(
>   function(item : Object, index : int, array : Array) : Boolean {
>return (b.indexOf(item) == -1);
>   });
> 
> May be the better solution exists?
>







[flexcoders] application exit event?

2008-02-22 Thread Maciek Sakrejda
I need to perform some cleanup when the user exits the application
(i.e., closes the page in which the application is embedded). Is there
an event I can listen for? I've tried Event.REMOVED, FlexEvent.REMOVE,
and Event.REMOVED_FROM_STAGE, but none of those seem to fire targetting
the actual application object. Any ideas?
-- 
Maciek Sakrejda
Truviso, Inc.
http://www.truviso.com




Re: [flexcoders] "With" statement in Pascal what is it in AS3

2008-02-25 Thread Maciek Sakrejda
Right. I've always been wary of the with construct (VB.NET, which I used
to work in, has it), but it can be used rather elegantly:

private function populateNode(d:DataSprite):Boolean
{
var p:Particle = d.props.particle;
if (p == null) {
d.props.particle = (p = _sim.addParticle(mass(d), d.x, d.y));
p.fixed = d.fixed;
} else {
with (p) { x = d.x; y = d.y; fixed = d.fixed; }
}
p.tag = _gen;
return true;
}

(from the flare[1] library)

[1] http://flare.prefuse.org


-- 
Maciek Sakrejda
Truviso, Inc.
http://www.truviso.com

-Original Message-
From: Troy Gilbert <[EMAIL PROTECTED]>
Reply-To: flexcoders@yahoogroups.com
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] "With" statement in Pascal what is it in AS3
Date: Mon, 25 Feb 2008 11:49:55 -0600

> Is there a similar shortcut in AS3 to save my delicate fingers from
> excessive typing?

Yes, it's the "with" keyword... clever, huh? ;-)

Though, it's generally avoided because the scoping issues can be
unclear when reading the code.

Troy.



 




RE: [flexcoders] Be the tree, Bob

2008-02-26 Thread Maciek Sakrejda
You may also want to consider the WindowShade component from FlexLib,
instead of the ComboBox:
http://flexlib.googlecode.com/svn/trunk/examples/WindowShade/WindowShade_Sample.swf

I found the kmossman example a little confusing to navigate, since
clicking on some things selected them (and collapsed the combobox), and
clicking others expanded the tree. I understand the intent of the
navigation, but it feels a little off. The windowshade may be a slicker
way to accomplish the same requirements you stated originally.


-- 
Maciek Sakrejda
Truviso, Inc.
http://www.truviso.com

-Original Message-
From: Brad Bueche <[EMAIL PROTECTED]>
Reply-To: flexcoders@yahoogroups.com
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Be the tree, Bob
Date: Tue, 26 Feb 2008 14:33:26 -0500

Thanks for the feedback Peter and Alex!
 
I have also found these two possible solutions:
 
http://cyberdust.wordpress.com/2007/02/23/introducing-selecttree-the-drop-down-tree-control/#comment-4946
 
However, this guy did part of it with cf and I'm getting an 1180 Error
"Call to possibly undefined method SubjectGateway".  I've asked if he
can give a flex only example.  As I'm a newbie, I'm much more into
re-use at this stage than writing the specifics myself (I"m learning as
fast as I can!). 
 
There is also this solution:
 
http://kmossman.blogspot.com/2007/03/blog-post.html
 
I'm still taking a look at this one.
 
Its a good sign though that you can think of something you might like in
flex, google it, and get multiple samples.  This is what enabled me to
learn php so fast.  I found them both by just typing "dropDownFactory =
Tree" into Google.
 
brad
 
keywords:  Tree Combobox dropDownFactory

-Original Message-
From: flexcoders@yahoogroups.com
[mailto:[EMAIL PROTECTED] On Behalf Of Peter DeHaan
Sent: Tuesday, February 26, 2008 2:04 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Be the tree, Bob


You could also try something like this:



  

  

  



And then tweak it slightly to fit your needs.

Peter



From: flexcoders@yahoogroups.com
[mailto:[EMAIL PROTECTED] On Behalf Of Alex Harui
Sent: Tuesday, February 26, 2008 10:04 AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Be the tree, Bob


Start with setting dropDownFactory=Tree.  There might be some
other things that need fixing though.



From: flexcoders@yahoogroups.com
[mailto:[EMAIL PROTECTED] On Behalf Of Brad Bueche
Sent: Tuesday, February 26, 2008 9:41 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Be the tree, Bob



http://blog.flexexamples.com/2007/11/29/opening-nodes-in-a-flex-tree-control-using-the-expanditem-method/



Is there anyway to get the tree view INTO the combo box?



I really like the idea of having a hierarchical menu that looks
exactly like the tree in this example.  I just want it to drop
down and be a menu like the combo box.  I detest the windows
file manager interface (because of its inefficient use of screen
real-estate) and I dont like cascading menu's because I get
really annoyed having to slow down and use my mouse in slow
motion just so I can get to the sub-menu I want.



I think the drop down tree hiearchy within a combobox solves
both of these problems. 1).  Its a great use of screen
real-estate  --- if you are not using it it takes up practically
no room and 2) the hierarchy is persistent and I dont have to be
a jedi master with my mouseand I dont have to move %80 down
and to the right to get the menu I want.



So would it be possible to do a tree in a combo box?  Or, if
thats impossible, I guess I can just put the tree on a
application bar and use it like a menu?



brad




 




[flexcoders] TextArea and line endings

2008-02-26 Thread Maciek Sakrejda
We have a TextArea that displays text pulled in from a database. That
text uses Windows line endings: \r\n. The TextArea seems to display a
line break for \r and another for \n. Is there any way around this?
Ideally, we'd like to handle heterogeneous line endings gracefully
(i.e., detect whether a file uses \n or \r\n, and act accordingly).

Any suggestions?

Thanks,
-- 
Maciek Sakrejda
Truviso, Inc.
http://www.truviso.com




Re: [flexcoders] A Weird DataGrid

2008-02-26 Thread Maciek Sakrejda
I think you're better off with a custom component (perhaps implemented
as an HBox of List controls). A DataGrid does indeed intend to show
*rows* of data. You'll be fighting the component's basic design idea the
whole way if you start with a DataGrid.

You should also consider the user interface impact of such a component:
it's an intriguing approach to the problem and it could certainly work,
but it's easy to create a usability train wreck when getting too
adventurous in UI design. Make sure to test it with real users as much
as possible.


-- 
Maciek Sakrejda
Truviso, Inc.
http://www.truviso.com

-Original Message-
From: jiggy <[EMAIL PROTECTED]>
Reply-To: flexcoders@yahoogroups.com
To: flexcoders@yahoogroups.com
Subject: [flexcoders] A Weird DataGrid
Date: Tue, 26 Feb 2008 14:48:50 -0800 (PST)


Hi, folks,

I am trying to do something weird with datagrid, which will be described
a
bit later. Please let me have your insights about if it is the right
direction or not.

I would like to have a table about 30 rows by 19 columns, which will
present
information about cars. Each column represents an attribute (e.g., mpg,
acceleration, price) of various cars, and each row (kind of) represent a
car
(e.g., civic, camry, accord, etc.). One thing strange about this table
is
that, all columns are sorted. It is different from the multi-sorting
feature
of AdvancedGrid. Let me show you an example.

Cars | MPG | Price
Accord | 10 mpg (of Civic) | $1 (of Camry)
Civic | 20 mpg (of Accord) | $2 (of Civic)
Camry | 30 mpg (of Camry) | $3 (of Accord)

Since all the columns (i.e., Cars, MPG, Price) are sorted, the rows are
messed up. The first row contains the information about Accord, the MPG
of
Civic, and the price of Camry. In this representation, a row doesn't
represent a specific car any more. So, what I am trying to do is when a
person move a mouse cursor on a cell of Accord, all the cells related
with
Accord will be highlighted. In this way, a user will find out which cell
belongs to Accord through highlights even though rows are messed up.

While implementing this, I found that the underlying data structure does
not
seem to be well matched with this user interface. Each row is treated as
the
same element of a collection. Drawing is done line by line. However, as
you
can see, a row in this strange datagrid represents attributes of
different
elements. Due to this, highlights cannot be drawn line by line. It will
highlights all over the places.

What do you think? Should I build one from scratch? Or, using DataGrid
will
be fine for this?

Regards,
Ji Soo Yi
-- 
View this message in context:
http://www.nabble.com/A-Weird-DataGrid-tp15701811p15701811.html
Sent from the FlexCoders mailing list archive at Nabble.com.




 




Re: [flexcoders] Using EventListeners with Functions

2008-02-27 Thread Maciek Sakrejda
Why not have the first call the second on completion?
-- 
Maciek Sakrejda
Truviso, Inc.
http://www.truviso.com

-Original Message-
From: Eric Cobb <[EMAIL PROTECTED]>
Reply-To: flexcoders@yahoogroups.com
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Using EventListeners with Functions
Date: Wed, 27 Feb 2008 11:34:25 -0600

I have two functions that I want to run when my Flex 3 / AIR app starts 
up. I'm running into problems where the second function is firing off 
before the first one is complete. Both functions work fine by 
themselves, but I need the first function to complete before the other 
one starts. 

How might we go about doing this? Is there some way to add an 
EventListener to the first function?




 




Re: [flexcoders] Flex SWF Size

2008-02-27 Thread Maciek Sakrejda
Posting the same question to the list over and over and using excessive
question marks causes your SWF to swell in size uncontrollably.

Seriously, though, I believe this is a result of statically linking with
the Flex framework. This has been addressed in Flex 3:

http://www.onflex.org/ted/2007/06/flex-3-thursday-dramatically-smaller.php


-- 
Maciek Sakrejda
Truviso, Inc.
http://www.truviso.com

-Original Message-
From: uriel_tru <[EMAIL PROTECTED]>
Reply-To: flexcoders@yahoogroups.com
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Flex SWF Size
Date: Wed, 27 Feb 2008 17:49:46 -

I know that this group is a bit more concentrated, but I'm having a
hard time getting any answers for this question, so I thought I'd try
this Group.
I have the following code in my Flex application:


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



Can anyone tell me why my application is 123KB? I don't have
anything in it!
Thanks,
Ken 




 




[flexcoders] Problem with loading xml file using HTTPService or URLLoader

2007-05-29 Thread Maciek Malaszuk
Hi,

I'm struggling with strange problem.
I'm trying to load XML file in my code which containst data about 
images but thats nor really relevant.

Lets assume i have remote server where i run my code (domain 
x.net).

When i point both httpservice or urlloader to http://mydomain.net/
photos.xml it does work on my local machine but DOES NOT when i copy 
the file to that mydomain server.

This is only one configuration it works on. 

Different scenario i tried and does not work is:
loader pointing to http://mylocalmachineIP/photos.xml (which is 
accessible from the internet) and application neither on local 
machine nor server works.

Did anyone encountered similar problem before? I would expect 
httpservice to be able to access file regardless of its location if 
the url is valid...

Thanks for help as i'm really stuck on this one.



[flexcoders] AccordionHeader

2006-10-12 Thread Maciek Wciślik
Hi list,

I want to have custom Accordion header (found Waldo Smith old 
implementation - doesn't work in new Flex2) with two controls in it - 
Button which controls Accordion behavior (as normal AccordionHeader), 
and CheckBox to do something else.
Does anybody did somethinglike that?
br
maciek


--
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] Method variable scoping problem with Flex compiler

2008-08-15 Thread Maciek Sakrejda
This is variable hoisting in action:

http://docs.huihoo.com/web/js/es4/core/definitions.html#hoist

I can't really find a clearer explanation, but the gist of it is that
variable definitions are sometimes moved to the parent block, and
sometimes this results in the sort of weird behavior you're seeing.

That's the how, but I don't really know the why--anyone more savvy about
hoisting care to enlighten the list?

-- 
Maciek Sakrejda
Truviso, Inc.
http://www.truviso.com

-Original Message-
From: toofah_gm <[EMAIL PROTECTED]>
Reply-To: flexcoders@yahoogroups.com
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Method variable scoping problem with Flex compiler
Date: Fri, 15 Aug 2008 19:43:09 -

It seems to me and my co-workers that the Flex compiler is broken when
it comes to local variable scoping within methods.

For example:

for (var i:int=0; i

Re: [flexcoders] Re: SecurityError: Error #2060: Security sandbox violation-what is the real solution

2008-08-17 Thread Maciek Sakrejda
You're getting annoyed because no one answered your question after seven
hours? On a weekend, no less? This is a mailing list, not a chat room.

Not to mention that the answer to your question is on a page linked from
the ExternalInterface documentation:

http://livedocs.adobe.com/flex/2/docs/wwhelp/wwhimpl/js/html/wwhelp.htm?href=1018.html

Your call is failing because 

x.x.com

is not the same domain as

www.xxx.com

(yes, that's a strict definition of "same domain", but that's how it is)

The page linked above explains how to set the allowScriptAccess property
in the HTML page to allow Flash to call scripts in it.

-Maciek


On Sun, 2008-08-17 at 15:10 +, vipinck wrote:
> So, no one (atleast people at adobe) knows about this. Cool
> 
> 
> 
> 
>  




Re: [flexcoders] Re: question about AMF

2008-08-22 Thread Maciek Sakrejda
http://www.google.com/search?q=alex+harui+blog


-Original Message-
From: tchredeemed <[EMAIL PROTECTED]>
Reply-To: flexcoders@yahoogroups.com
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: question about AMF
Date: Fri, 22 Aug 2008 17:57:47 -

Where is your blog at?

--- In flexcoders@yahoogroups.com, "Alex Harui" <[EMAIL PROTECTED]> wrote:
>
> Shared code problem. See modules presentation on my blog for more
> details.
> 
> 
> 
> 
> 
> From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED]
On
> Behalf Of tchredeemed
> Sent: Friday, August 22, 2008 9:47 AM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] question about AMF
> 
> 
> 
> I have a VO called DataVO.
> 
> I have two modules that call an AMF service, which returns an array of
> VO's.
> 
> Every once in a while, I get the error: 
> TypeError: Error #1034: Type Coercion failed: cannot convert
> com.gh.vo::[EMAIL PROTECTED] to com.gh.vo.DataVO.
> 
> However, I can only get the compiler to throw this error in 1
situation:
> 
> I start the app, load Module 2, than Module 1, than go back to Module
> 2. After I arrive back at Module 2, it throws the error on the
> resultHandler of the RemoveObject service, in code that looks like
this:
> 
> private function resultHandler( event:ResultEvent ):void {
> var hash:Array = new Array();
> for each( var data:DataVO in event.result ){
> hash.push(data);
> }
> dataAC = new ArrayCollection( hash );
> }
> 
> It breaks on the for each() line.
> Any ideas?
>




 




Re: [flexcoders] Extends vs Implement EventDispatcher

2008-09-05 Thread Maciek Sakrejda
Unless Flex is doing something really crazy, that should be fine. The
only caveat is that, of course, you'll have to implement all the
IEventDispatcher methods yourself, but you can just pass these off to a
nested EventDispatcher object. In theory, you've got an additional
function call, but in practice, that will not make a difference.
-- 
Maciek Sakrejda
Truviso, Inc.
http://www.truviso.com


On Fri, 2008-09-05 at 12:17 +, reflexactions wrote:
> Is there a performance difference between having a class extend 
> EventDispatcher vs implementing IEventDispatcher.
> 
> Reason for the question is I have a class which currently extends 
> EventDispatcher and now it needs to extend another class that is not
> an 
> EventDispatcher. This will get properly fixed up in a few days but 
> temporarily the answer is to have it implement IEventDispatcher but I 
> was wondering if it is going to effect performance in any way ...
> 
> tks
> 
> 
> 
> 
>  




Re: [flexcoders] Extends vs Implement EventDispatcher

2008-09-05 Thread Maciek Sakrejda
True, but I was under the impression that a virtual method lookup was
cheaper than a whole new method call. Not to mention the bytes and bytes
of overhead from having to keep another object (the nested
EventDispatcher) on the heap ;).

I think Michael A. Jackson said it best: "The First Rule of Program
Optimization: Don't do it. The Second Rule of Program Optimization (for
experts only!): Don't do it yet."
-- 
Maciek Sakrejda
Truviso, Inc.
http://www.truviso.com

On Fri, 2008-09-05 at 12:07 -0400, Michael Schmalle wrote:
> > In theory, you've got an additional function call, but in practice,
> that will not make a difference.
> 
> Do you? I mean he does not have to over head (what little it may be)
> of the super classes methods and calls.
> 
> I'm sure this is a trivial answer of it doesn't matter. :)
> 
> Mike
> 
> On Fri, Sep 5, 2008 at 12:04 PM, Maciek Sakrejda
> <[EMAIL PROTECTED]> wrote:
> Unless Flex is doing something really crazy, that should be
> fine. The
> only caveat is that, of course, you'll have to implement all
> the
> IEventDispatcher methods yourself, but you can just pass these
> off to a
> nested EventDispatcher object. In theory, you've got an
> additional
> function call, but in practice, that will not make a
> difference.
> -- 
> Maciek Sakrejda
> Truviso, Inc.
> http://www.truviso.com
> 
> 
> 
> On Fri, 2008-09-05 at 12:17 +, reflexactions wrote:
> > Is there a performance difference between having a class
> extend 
> > EventDispatcher vs implementing IEventDispatcher.
> > 
> > Reason for the question is I have a class which currently
> extends 
> > EventDispatcher and now it needs to extend another class
> that is not
> > an 
> > EventDispatcher. This will get properly fixed up in a few
> days but 
> > temporarily the answer is to have it implement
> IEventDispatcher but I 
> > was wondering if it is going to effect performance in any
> way ...
> > 
> > tks
> > 
> > 
> > 
> > 
> > 
> 
> 
> 
> 
> 
> -- 
> Teoti Graphix, LLC
> http://www.teotigraphix.com
> 
> Teoti Graphix Blog
> http://www.blog.teotigraphix.com
> 
> You can find more by solving the problem then by 'asking the
> question'.
> 
>  




[flexcoders] Repeater children

2008-09-12 Thread Maciek Sakrejda
I'm trying to use a repeater to configure n different bars in a foo

(e.g., in pseudo-code

foo
  bars:Array = [ { bar1, bar2, bar3 ];
  ...

where each bar is something like

bar
  label:String
  baz:String
  ...

)

each of the bars has a baz that can be one of five different Strings. My
current approach is to use a repeater:










...

This works very nicely for displaying the correct controls with the
current baz of each bar, but I'm not sure how to come up with a clean
way to "harvest" the settings of each combobox when updating the set. I
don't want to directly listen to each ComboBox CHANGE event because I
want to have update/cancel functionality for the entire group. Is there
a way of doing this cleaner than iterating over the children of barRptr
(presumably FormItems) and doing getChildAt(0) to get the ComboBoxes?

Thanks,
-- 
Maciek Sakrejda
Truviso, Inc.
http://www.truviso.com




Re: [flexcoders] Repeater children

2008-09-12 Thread Maciek Sakrejda
Of course, the searching pays off right *after* I post. If anyone else
is curious:

http://blog.flexexamples.com/2008/05/29/displaying-checkbox-controls-using-the-repeater-in-flex/#more-650

It's kinda sneaky: you set the id of the repeated element as you usually
would, but instead of creating an element with that id, you get an array
of elements with that id, indexed by the order in which the Repeater
repeated them.
-- 
Maciek Sakrejda
Truviso, Inc.
http://www.truviso.com

-Original Message-
From: Maciek Sakrejda <[EMAIL PROTECTED]>
Reply-To: flexcoders@yahoogroups.com
To: flexcoders 
Subject: [flexcoders] Repeater children
Date: Fri, 12 Sep 2008 11:21:37 -0700

I'm trying to use a repeater to configure n different bars in a foo

(e.g., in pseudo-code

foo
bars:Array = [ { bar1, bar2, bar3 ];
...

where each bar is something like

bar
label:String
baz:String
...

)

each of the bars has a baz that can be one of five different Strings. My
current approach is to use a repeater:










...

This works very nicely for displaying the correct controls with the
current baz of each bar, but I'm not sure how to come up with a clean
way to "harvest" the settings of each combobox when updating the set. I
don't want to directly listen to each ComboBox CHANGE event because I
want to have update/cancel functionality for the entire group. Is there
a way of doing this cleaner than iterating over the children of barRptr
(presumably FormItems) and doing getChildAt(0) to get the ComboBoxes?

Thanks,
-- 
Maciek Sakrejda
Truviso, Inc.
http://www.truviso.com




 




Re: [flexcoders] Re: Subclassing Components: Theoretical Question

2008-09-12 Thread Maciek Sakrejda
Who is that quote from? I'm on the last steps of a massive rethinking,
refactoring, and rewriting, and I'm really glad to be able to do
it--I've had to deal with piles upon piles of hackery for long enough.
It feels really good.

-Maciek


-Original Message-
From: Michael Schmalle <[EMAIL PROTECTED]>
Reply-To: flexcoders@yahoogroups.com
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Re: Subclassing Components: Theoretical
Question
Date: Fri, 12 Sep 2008 11:17:59 -0400

My favorite quote;

There comes a point in the life cycle of any system when adding one more
patch 
is the wrong solution to every problem. Eventually, it's time to
rethink, refactor, 
and rewrite.

Mike

On Fri, Sep 12, 2008 at 11:09 AM, Tim Hoff <[EMAIL PROTECTED]> wrote:
Heretofore known as the blahBlahBlahButton. :)

-TH



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

> heh, that's almost the exact description of what I called the
> "CanvasButton":
>
http://dougmccune.com/blog/2007/06/01/new-component-canvasbutton-
added-to-flexlib/
> 
> Doug
> 

> On Thu, Sep 11, 2008 at 3:22 PM, Josh McDonald <[EMAIL PROTECTED]>
wrote:
> 
> > Yeah, I'd make one subclass of Button that lets you put 
whatever you
> > please as the label, and have "function set labelControl
(cntrl:*)" as the
> > [DefaultProperty]. If it finds a string, go with a
UITextField, 
if it's a
> > DisplayObject, use it, if not throw an error. Then you have:
> >
> > 
> > blah blah blah blah blah blah blah blah
blah
> > 
> >
> > -Josh
> >
> >


> > On Fri, Sep 12, 2008 at 8:04 AM, Alex Harui <[EMAIL PROTECTED]>
wrote:
> >
> >> Make one subclass that handles both HTML and multiline?
> >>
> >>
> >>
> >> *From:* flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] *On
> >> Behalf Of *wnoone01
> >> *Sent:* Thursday, September 11, 2008 11:17 AM
> >> *To:* flexcoders@yahoogroups.com
> >> *Subject:* [flexcoders] Subclassing Components:
Theoretical 
Question
> >>
> >>
> >>
> >> Hey all,
> >> I've got a theoretical question about subclassing a
component. 
Here is
> >> the use case:
> >>
> >> A programmer requires buttons that support multiline
labels. 
This is a
> >> requiement for Button, RadioButton, and CheckBox. Now to
start, 
the
> >> programmer can subclass mx.controls.Button to implement the
> >> functionality. But now he needs to implement the
functionality in
> >> RadioButton and CheckBox.
> >>
> >> One way is to subclass RadioButton and CheckBox and then 
duplicate the
> >> functionality there. However, not only will he be
duplicating
> >> functionality, he is headed down a slippery slope. Let's
say 
that for
> >> his next project, he suddenly requires a button label that 
supports
> >> HTML formatting. Now he must subclass again. So now the
classes 
grow
> >> from:
> >>
> >> MultilineButton
> >> MultilineRadioButton
> >> MultilineCheckBox
> >>
> >> To
> >>
> >> MultilineButton
> >> HTMLButton
> >> MultilineRadioButton
> >> HTMLRadioButton
> >> MultilineCheckBox
> >> HTMLCheckBox
> >>
> >> The next project requires a multiline html button. So now
its:
> >>
> >> MultilineButton
> >> HTMLButton
> >> MultilineHTMLButton
> >> MultilineRadioButton
> >> HTMLRadioButton
> >> MultilineHTMLRadioButton
> >> MultilineCheckBox
> >> HTMLCheckBox
> >> MultilineHTMLCheckBox
> >>
> >> And now its officially out of hand and the

Re: [flexcoders] Re: RadioButtonGroup id not settable using repeater index...

2008-09-16 Thread Maciek Sakrejda
>This is pretty thoroughly documented in the docs for
>repeater.

Is it? I asked the group about the same thing myself recently, and I
didn't see anything in the Repeater docs in the Flex library reference.
I just checked, and there's no mention in either Flex 2 or 3 docs of
this specific child-naming behavior.

The QuickStart Basics section does explain this, now that I've search
some more, but this should really be in the core library reference.

-- 
Maciek Sakrejda
Truviso, Inc.
http://www.truviso.com

-Original Message-
From: Amy <[EMAIL PROTECTED]>
Reply-To: flexcoders@yahoogroups.com
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: RadioButtonGroup id not settable using
repeater index...
Date: Tue, 16 Sep 2008 21:28:46 -

--- In flexcoders@yahoogroups.com, "Durres76" <[EMAIL PROTECTED]> wrote:
>
> hey,
> i'm generating radio button groups using a repeater, but am getting
> errors when trying to set the id of RadioButtonGroup using the
> repeater index. The code is below. How else can you generate multiple
> groups dynamically
> 
> 
> 
> some Radio buttons.
> 
> 
> 
> Thanks,
> d
>

Just use something like 



Then group[0] will refer to the first one, group[1] will refer to the 
second one, etc. This is pretty thoroughly documented in the docs for 
repeater.

HTH;

Amy




 




Re: [flexcoders] Re: RadioButtonGroup id not settable using repeater index...

2008-09-16 Thread Maciek Sakrejda
No, I mean it should be in the library reference:

http://livedocs.adobe.com/flex/2/langref/mx/core/Repeater.html

The behavior is black magic enough that it should really be referenced
there, since it's more fundamental in scope than a tutorial.

But thanks for adding it to your FAQ--that's sure to save some folks
some grief.

-- 
Maciek Sakrejda
Truviso, Inc.
http://www.truviso.com

On Wed, 2008-09-17 at 00:56 +, Amy wrote:
> --- In flexcoders@yahoogroups.com, Maciek Sakrejda <[EMAIL PROTECTED]> 
> wrote:
> >
> > >This is pretty thoroughly documented in the docs for
> > >repeater.
> > 
> > Is it? I asked the group about the same thing myself recently, and I
> > didn't see anything in the Repeater docs in the Flex library 
> reference.
> > I just checked, and there's no mention in either Flex 2 or 3 docs of
> > this specific child-naming behavior.
> > 
> > The QuickStart Basics section does explain this, now that I've
> search
> > some more, but this should really be in the core library reference.
> 
> What, like this?
> http://livedocs.adobe.com/flex/3/html/help.html?content=repeater_3.html
> 
> 
> 
> 
>  




Re: [flexcoders] Please share your experiences with Flex 3 charting (visualization component)

2008-09-17 Thread Maciek Sakrejda
We use Flex for a real-time dashboard at Truviso, and we haven't run
into any major with charts so far. For what it's worth, we're still on
Flex 2, but with FB3, which the bug report states *should* reproduce the
problem (which is odd--FB itself should have nothing to do with this if
the SDK versions are identical). I also noticed from the bug description
that this happens mostly when replacing the dataProvider/series: we keep
the same series/ListCollectionView object but update the contents as new
data comes in.

We definitely depend on Flex Charting for a stable real-time dashboard,
and the data binding paradigm makes this an ideal library for this
purpose. It would be a shame to have to move to something else because
of stability issues.

-- 
Maciek Sakrejda
Truviso, Inc.
http://www.truviso.com

-Original Message-
From: kumar_raj <[EMAIL PROTECTED]>
Reply-To: flexcoders@yahoogroups.com
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Please share your experiences with Flex 3 charting
(visualization component)
Date: Wed, 17 Sep 2008 16:44:16 -

I wanted to start a thread on user experience on Flex3 charting or 
visualization component.

I had been pusing back hard the last 2 years on moving out realtime 
charting from current serverside image generation to flex charting.

Finally with flex 3 prof , I caved in. Hight cpu usage on servers in 
our production env is of course another motivating factor :)

The state of the charting components seems to be in a bit of a sorry 
state though. Demo looks complelling when used with static data.
Moment we start doing some realtime refesh we're hit with memory and 
cpu usage issues.

Please look at bug http://bugs.adobe.com/jira/browse/SDK-15710 for 
more on this.

These bugs have been filed a while and ago and doesn't seem to have 
been placed high on the priority list.

So I wanted to find out if people in the industry are using flex 
charting solution in realtime dashboards. If so what are your 
experiences.

My experince so far in moving our system to flex charting has been 
quite rocky. here are few issues I'm struggling with

1) With frequent chart updates (say evebry 5 sec), there is lot of 
memory leaks not easily identifiable via flex profiler.
2) Browsers especially IE6 do not claim back memory efficiently.

3) Bar chart frequest update has hig cpu usage

Thanks
Kumar Pandey




 




Re: [flexcoders] Bizarre XML data transformation

2008-09-17 Thread Maciek Sakrejda
Flex sees something that looks like a number in the XML and treats it as
a floating point Number type (since the number in the XML is too big to
fit in an int). Because of the way IEEE floating point works (take a
look if you're interested: http://en.wikipedia.org/wiki/IEEE_754 -- it's
neat), very large and very small numbers lose precision.

The issue has come up on the list before; you can search the archives
for a workaround (I know the cause, but don't know the solution).
-- 
Maciek Sakrejda
Truviso, Inc.
http://www.truviso.com

-Original Message-
From: cjsutherland <[EMAIL PROTECTED]>
Reply-To: flexcoders@yahoogroups.com
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Bizarre XML data transformation
Date: Wed, 17 Sep 2008 19:09:55 -

Once again, I've hit a roadblock with Flex for something that should
be easy as pie.

Here's the problem: I'm loading in an XML feed from Flickr, a list of
photoset IDs. There's nothing wrong or unusual about the XML document. 

I load the XML into an ArrayCollection, and can view all the data just
fine, except the ONE element I need... the ID number. Flex is
screwing it up somehow.

For example, the ID number in the XML file looks like this:
72157607109678346

However, when Flex returns the ID number, it becomes: 72157607109678350

Every ID is changed like that, but it's not consistent. The first
one, 4 is added to the ID. In the next, 12 is subtracted. No rhyme
or reason.

What Flex is doing to this number or why it's doing it escapes me. 
I've tried copying the XML file locally and appending the ID with a
character... it then comes across fine. So Flex thinks the ID is some
kind of number datatype, and manipulating it somehow. 

Any idea how to make Flex cut that out?




 




Re: [flexcoders] Re: Flex Enhancement, TabIndex

2008-09-17 Thread Maciek Sakrejda
Out of curiosity, I checked JIRA and there are only six issues with 100+
votes, so if you've got a lot of friends, you should be able to get in
the Top 10 Most Popular Bugs fairly easily...


-Original Message-
From: aceoohay <[EMAIL PROTECTED]>
Reply-To: flexcoders@yahoogroups.com
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Flex Enhancement, TabIndex
Date: Wed, 17 Sep 2008 22:59:07 -

Alex:

I've got one vote from Jim Abbott on the bug.

How many do I need before it makes a difference?

Paul

--- In flexcoders@yahoogroups.com, Alex Harui <[EMAIL PROTECTED]> wrote:
>
> Probably not subclass, but maybe replace it. It will be a bunch 
of work though.
> 
> In theory the tabloop (if you don't use tabIndex) should be 
hierarchical and go through one container then the next. But it 
won't loop within a container if there are other tabbable entities.
> 
> Besides the non-modal approach, you can always tabEnabled=false on 
components not in the container of choice, or catch the focusOut 
going outside the container and restore focus to someplace you 
like. All three options would be less work, IMHO, than writing your 
own focusmanager.
> 
> I still wouldn't bet any money on your bugs being fixed, but I've 
been wrong before.
> 
> -Alex
> 
> From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On Behalf Of aceoohay
> Sent: Wednesday, September 17, 2008 7:13 AM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Re: Flex Enhancement, TabIndex
> 
> 
> Alex:
> 
> While I have never worked in a large environment such as the one 
you
> are in, I believe I understand the issues. I have filed/refiled bug
> requests on the two issues mentioned below. Hopefully I am not
> spittin' in the wind.
> 
> What we are trying to do with Flex is to create an environment 
where
> the user does not need to leave our application to do most things,
> and we allow them to bring up many modules at the same time. We 
need
> the ability to keep a user within a module preferably without
> rewriting everything we have done so far.
> 
> A fellow named Josh suggested I might be able to sub-class the 
Focus
> Manager, do you think this is a viable alternative?
> 
> Paul
> 
> --- In flexcoders@yahoogroups.com, Alex Harui  wrote:
> >
> > In my understanding of accessibility rules, you need some
> consistent way of navigating to all controls w/o using a mouse. I'm
> not clear there is an existing pattern for what you want to do, but
> I'm no expert on the patterns. You mentioned that it works for
> existing Client/Server apps. How do they switch between panels
> without the mouse?
> >
> > You are always welcome to file bugs and enhancement requests, and
> now, even patches that propose the fix, but it all gets prioritized
> and I'd swear that 90% of it never gets done. Sorry for pooping on
> your ideas, but I'm just voicing my opinion that we've got way
> bigger fish to fry than those two issues. We also have performance
> and size issues that make me lean against adding lots of options to
> our code or doing anything that requires a few more milliseconds 
for
> everyone. You aren't the only one I've told not to get their hopes
> up. I hate being the bad guy, but I also feel bad for those who
> take the time to submit an issue and have it rejected. Further, I
> have some idea of what our major goals are for any upcoming
> release. Based on that, in the prioritization committee, I'll be
> saying that your two ideas aren't as important as the other issues
> on our list and probably have workarounds. If you get bunches of
> votes, that'll pretty much drown me out, and believe me, I get
> overridden often, but then there'll still be issues of opportunity
> cost. If it does take me two days to do something, that's probably
> four other issues that could have been done instead. It's a
> complicated system of tradeoffs.
> >
> > I know it is frustrating when we don't have some feature that is
> important to you. As we move into the future, my goal is to make
> more hooks (so you can replace FocusManager if you want to) instead
> of adding switches and options that make the framework larger. You
> might see some of that by the time Flex 4 ships, but don't count on
> it.
> >
> > -Alex
> >
> > From: flexcoders@yahoogroups.com
> [mailto:flexcoders@yahoogroups.com] On Behalf Of aceoohay
> > Sent: Tuesday, September 16, 2008 6:04 PM
> > To: flexcoders@yahoogroups.com
> > Subject: [flexcoders] Re: Flex Enhancement, TabIndex
> >
> >
> > Alex:
> >
> > How does this work against accessibility rules?
> >
> > First, I am suggesting something that enhances flexibility while
> > leaving the default behavior alone. Second, the current default
> > behavior irrespective of accessibility rules is counter 
intuitive.
> >
> > Over time I have made two suggestions regarding how Flex should
> 

Re: [flexcoders] Alex going offline for a while

2008-09-18 Thread Maciek Sakrejda
These should probably be added to the FAQ. Then when someone asks a
question that falls into one of these categories, the old-timers can
just answer, e.g., "That's a number 5".
-- 
Maciek Sakrejda
Truviso, Inc.
http://www.truviso.com


On Wed, 2008-09-17 at 21:02 -0700, Alex Harui wrote:
> Well, the time has come for me to take a break from answering
> flexcoders postings.  I’ll be turning off my computer around 9pm PDT
> Thursday and going on sabbatical so I won’t be thinking about Flex
> until October 10 or 20.  The last 10 days are “vacation” so I might
> check in to start getting my brain in gear again.
> 
>  
> 
> In the meantime, I’m sure the community will eventually answer
> everything I would anyway, but just in case, here are some possible
> responses:
> 
>  
> 
> 1) Search the archives
> 
> 2) Google for examples
> 
> 3) Use the debugger
> 
> 4) Use the profiler
> 
> 5) Post the entire stacktrace using a debug build so you get line
> numbers
> 
> 6) Item renderers recycle
> 
> 7) Read my blog
> 
> 8) Feel free to file a bug or enhancement request
> 
> 9) Yes it is probably possible, but has difficulty rating of ___
> 
> 10)  Ask Matt or Gordon.
> 
>  
> 
> See you in October
> 
>  
> 
> -Alex
> 
> 
>  




Re: [flexcoders] Re: as3CoreLib

2008-09-18 Thread Maciek Sakrejda
For what it's worth, crazy or not, it is reasonably common for small
projects to have svn-(or other vcs)-only access to source. Packaging up
source releases is just another piece of work for the maintainers. It
does seem that something like corelib should have a source package,
though.

-Maciek


-Original Message-
From: Amy <[EMAIL PROTECTED]>
Reply-To: flexcoders@yahoogroups.com
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: as3CoreLib
Date: Thu, 18 Sep 2008 16:35:51 -

--- In flexcoders@yahoogroups.com, "Haykel BEN JEMIA" <[EMAIL PROTECTED]> 
wrote:
>
> There isn't such a link! You will have to install a Subversion client 
and
> use it to get (check out) the sources from
> http://as3corelib.googlecode.com/svn/trunk/ . You can find a list of
> subversion clients on: http://subversion.tigris.org/ (Third-Party 
Clients).

It seems crazy to force people who are not working on the project to 
check out code. Is it possible there's just an error in how the 
project is set up in google code? Who would I contact to get that 
fixed?

Thanks;

Amy




 




Re: [flexcoders] unable to use debug mode

2008-09-19 Thread Maciek Sakrejda
There is (was?) a FB bug caused by a Firefox 3 bug that had these exact
symptoms:

http://bugs.adobe.com/jira/browse/FB-13064
https://bugzilla.mozilla.org/show_bug.cgi?id=438830

The FF bug is resolved as FIXED, but I don't understand exactly when
(that is, in which release). For what it's worth, the debugger is
working again for me now (latest Firefox 3 in Ubuntu).

-- 
Maciek Sakrejda
Truviso, Inc.
http://www.truviso.com

-Original Message-
From: windsail05 <[EMAIL PROTECTED]>
Reply-To: flexcoders@yahoogroups.com
To: flexcoders@yahoogroups.com
Subject: [flexcoders] unable to use debug mode
Date: Fri, 19 Sep 2008 23:08:29 -

For the past couple of months I have not been able to use debug mode 
for one of my workspaces. I am able to be in debug mode and run 
things from debug mode, but none of my breakpoints get triggered and 
none of my traces show up. I am not sure why this is happening. This 
workspace use to work in debug mode.

Does anyone know of any settings that could have been changed or 
reasons for this happening?




 




Re: [flexcoders] Re: deep linking problems

2008-09-22 Thread Maciek Sakrejda
Thanks for posting the answer. People often follow up with just "Never
mind--figured it out", which is not very useful to someone with the
exact same problem reading the question in the archives a few weeks
later.
-- 
Maciek Sakrejda
Truviso, Inc.
http://www.truviso.com

-Original Message-
From: learningflexfromscratch <[EMAIL PROTECTED]>
Reply-To: flexcoders@yahoogroups.com
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: deep linking problems
Date: Sun, 21 Sep 2008 23:27:15 -

--- In flexcoders@yahoogroups.com, "learningflexfromscratch"
<[EMAIL PROTECTED]> wrote:
>
> Hey all,
> 
> I've run into a problem when trying to get deep linking to work in my
> Flex application. I'm pretty sure I'm just missing a very basic point
> about file structure or something, as I'm new to this. The problem is
> this: I've copy and pasted some example code from Adobe labs
>
<http://labs.adobe.com/wiki/index.php/Flex_3:Feature_Introductions:_Deep
\
> _Linking> into Flex Builder, and when I run the app from the IDE,
> everything seems to work fine. (The fragments update, and the browser
> navigation works). However, and this is probably where I'm making some
> mistake, when I perform a "release build", and then upload all of the
> files from bin release to my server, the fragments in the URL no
longer
> update. I've tried to follow the instructions as closely as possible. 
> I've uploaded every file from the bin release folder to my server. Is
> there something I'm forgetting to change in the code, or is it
possible
> that I'm not deploying the application correctly?
> 
> Thanks in advance for your help,
> 
> Newman
>
I figured it out...I was uploading the files from the "history"
subdirectory when I should have been leaving the folder structure in
place. 




 




[flexcoders] horizontal axis chart label size when chart has minimal height

2008-09-24 Thread Maciek Sakrejda
When I resize a chart (e.g., Column), below a certain size (seems to be
~100-200 pixels), the labels on the horizontal axis shrink into
illegibility. Is there a way to prevent the labels from shrinking?

For an example of what I'm talking about, go to
http://examples.adobe.com/flex2/inproduct/sdk/explorer/explorer.html

, select Charts > Chart Controls > BarChart, and drag the divider of the
HDividedBox on the right up until just before the chart window itself
gets scrollbars. The labels shrink down to just a few pixels tall and
are completely illegible by the end.

I would like to keep the labels at the given height (notice that, e.g.,
the vertical axis labels on the AxisRenderer example do not shrink this
way), and keep shrinking the chart instead. The behavior seems
inconsistent: sometimes the labels shrink and sometimes they don't. And
it's not just related to horizontal versus vertical: take a look at the
AreaChart example--both sets of labels shrink when you drag in the right
browser edge to shrink the chart, but neither set changes when you drag
up the divider below.

Any thoughts?

Thanks,
-- 
Maciek Sakrejda
Truviso, Inc.
http://www.truviso.com




Re: [flexcoders] Re: horizontal axis chart label size when chart has minimal height

2008-09-24 Thread Maciek Sakrejda
Tim,

Do you know when you set the gutter? The gutter set is throwing a null
reference error for me. The docs say it should be set by the chart, so I
suppose that's partially why, but I hope I can work around that...

-Maciek


-Original Message-
From: Tim Hoff <[EMAIL PROTECTED]>
Reply-To: flexcoders@yahoogroups.com
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: horizontal axis chart label size when chart
has minimal height
Date: Wed, 24 Sep 2008 20:25:15 -


Hey Maciek,

Setting an explicit gutter value fixed a similar problem that had once
with the labels on a chart. If I remember correctly, the label's font
will become illegible when the labelSizeLimt is met, or the label
dimensions force the font to be below the fontSize; because the label's
container has smaller dimensions than the label itself.

-TH

--- In flexcoders@yahoogroups.com, Maciek Sakrejda <[EMAIL PROTECTED]>
wrote:
>
> When I resize a chart (e.g., Column), below a certain size (seems to
be
> ~100-200 pixels), the labels on the horizontal axis shrink into
> illegibility. Is there a way to prevent the labels from shrinking?
>
> For an example of what I'm talking about, go to
> http://examples.adobe.com/flex2/inproduct/sdk/explorer/explorer.html
>
> , select Charts > Chart Controls > BarChart, and drag the divider of
the
> HDividedBox on the right up until just before the chart window itself
> gets scrollbars. The labels shrink down to just a few pixels tall and
> are completely illegible by the end.
>
> I would like to keep the labels at the given height (notice that,
e.g.,
> the vertical axis labels on the AxisRenderer example do not shrink
this
> way), and keep shrinking the chart instead. The behavior seems
> inconsistent: sometimes the labels shrink and sometimes they don't.
And
> it's not just related to horizontal versus vertical: take a look at
the
> AreaChart example--both sets of labels shrink when you drag in the
right
> browser edge to shrink the chart, but neither set changes when you
drag
> up the divider below.
>
> Any thoughts?
>
> Thanks,
> --
> Maciek Sakrejda
> Truviso, Inc.
> http://www.truviso.com
>




 




Re: [flexcoders] Re: horizontal axis chart label size when chart has minimal height

2008-09-25 Thread Maciek Sakrejda
Sorry--I wasn't clear. There's a gutter property on the AxisRenderer,
but when I set it explicitly, one of the methods called by the setter
throws a null reference error (presumably because I'm calling the setter
at the wrong time). I was asking when to call the gutter setter.

-Maciek


-Original Message-
From: Amy <[EMAIL PROTECTED]>
Reply-To: flexcoders@yahoogroups.com
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: horizontal axis chart label size when chart
has minimal height
Date: Wed, 24 Sep 2008 23:13:55 -

--- In flexcoders@yahoogroups.com, Maciek Sakrejda <[EMAIL PROTECTED]> 
wrote:
>
> Tim,
> 
> Do you know when you set the gutter? The gutter set is throwing a null
> reference error for me. The docs say it should be set by the chart, 
so I
> suppose that's partially why, but I hope I can work around that...

I think it's a style, like most things with charts.

HTH;

Amy




 




[flexcoders] URLRequest, ByteArray, and the 0 byte

2008-09-25 Thread Maciek Sakrejda
I've run into an interesting problem with URLRequest, navigateToURL, and
ByteArray when sending a zero byte:

var bytes:ByteArray = new ByteArray();
bytes.writeByte(1);
bytes.writeByte(1);
bytes.writeByte(1);
bytes.writeByte(1);

requestHeader = new URLRequestHeader("Content-type",
"application/octet-stream");
// Where ../../test is just a valid dummy url--it doesn't matter what it
// actually does with the request
request:URLRequest = new URLRequest("../../test");
request.requestHeaders.push(header);
request.method = URLRequestMethod.POST;
request.data = bytes;
navigateToURL(request, "_blank");


I write four bytes above, because that seems to be a minimum for
URLRequest (if I write just one byte, the Content-Length header is set
to 4 anyway), but that's a separate issue.

If I change one of those

bytes.writeByte(1)

to

bytes.writeByte(0)

The byte array seems to be truncated to the location of that byte. In
general, any ByteArray sent as a data property payload of a URLRequest
seems to be truncated to the location of the first zero byte. I've
confirmed this by checking the Content-Length header of the POST request
(in fact, if the *first* byte is zero, the request seems to be turned
into a GET--which is even weirder).

I'm using FP 9.0.124.0 on Linux. I just tested on a colleague's machine,
and this seems to work fine in FP on Vista. Is this a known issue? Is
there any way around this?


-- 
Maciek Sakrejda
Truviso, Inc.
http://www.truviso.com




[flexcoders] compc: locking assertion failure

2008-09-25 Thread Maciek Sakrejda
Running compc after adding some embedded assets, I get the following
assertion failure. The build seems to finish fine, but this is somewhat
disconcerting. Any ideas?

[compc] Locking assertion failure.  Backtrace:
[compc] #0 /usr/lib/libxcb-xlib.so.0 [0xb740d767]
[compc] #1 /usr/lib/libxcb-xlib.so.0(xcb_xlib_unlock+0x31) [0xb740d8b1]
[compc] #2 /usr/lib/libX11.so.6(_XReply+0xfd) [0x926071bd]
[compc] #3 
/usr/lib/jvm/java-1.5.0-sun-1.5.0.15/jre/lib/i386/xawt/libmawt.so [0x926d9dce]
[compc] #4 
/usr/lib/jvm/java-1.5.0-sun-1.5.0.15/jre/lib/i386/xawt/libmawt.so [0x926c3d77]
[compc] #5 
/usr/lib/jvm/java-1.5.0-sun-1.5.0.15/jre/lib/i386/xawt/libmawt.so [0x926c3ef3]
[compc] #6 
/usr/lib/jvm/java-1.5.0-sun-1.5.0.15/jre/lib/i386/xawt/libmawt.so(Java_sun_awt_X11GraphicsEnvironment_initDisplay+0x26)
 [0x926c4136]
[compc] #7 [0xb140f008]
[compc] #8 [0xb1408b6b]
[compc] #9 [0xb1408b6b]
[compc] #10 [0xb1406236]
[compc] #11 
/usr/lib/jvm/java-1.5.0-sun-1.5.0.15/jre/lib/i386/server/libjvm.so [0xb76aceac]
[compc] #12 
/usr/lib/jvm/java-1.5.0-sun-1.5.0.15/jre/lib/i386/server/libjvm.so [0xb787caa8]
[compc] #13 
/usr/lib/jvm/java-1.5.0-sun-1.5.0.15/jre/lib/i386/server/libjvm.so [0xb76accdf]
[compc] #14 
/usr/lib/jvm/java-1.5.0-sun-1.5.0.15/jre/lib/i386/server/libjvm.so(JVM_DoPrivileged+0x32d)
 [0xb770a7ed]
[compc] #15 
/usr/lib/jvm/java-1.5.0-sun-1.5.0.15/jre/lib/i386/libjava.so(Java_java_security_AccessController_doPrivileged__Ljava_security_PrivilegedAction_2+0x3d)
 [0xb73ba30d]
[compc] #16 [0xb140e898]
[compc] #17 [0xb1408a94]
[compc] #18 [0xb1406236]
[compc] #19 
/usr/lib/jvm/java-1.5.0-sun-1.5.0.15/jre/lib/i386/server/libjvm.so [0xb76aceac]
[compc] Locking assertion failure.  Backtrace:
[compc] #0 /usr/lib/libxcb-xlib.so.0 [0xb740d767]
[compc] #1 /usr/lib/libxcb-xlib.so.0(xcb_xlib_lock+0x2e) [0xb740d81e]
[compc] #2 /usr/lib/libX11.so.6 [0x92606518]
[compc] #3 /usr/lib/libX11.so.6(XGetVisualInfo+0x26) [0x925fd0a6]
[compc] #4 
/usr/lib/jvm/java-1.5.0-sun-1.5.0.15/jre/lib/i386/xawt/libmawt.so [0x926c30b9]
[compc] #5 
/usr/lib/jvm/java-1.5.0-sun-1.5.0.15/jre/lib/i386/xawt/libmawt.so [0x926c3303]
[compc] #6 
/usr/lib/jvm/java-1.5.0-sun-1.5.0.15/jre/lib/i386/xawt/libmawt.so [0x926c3fa1]
[compc] #7 
/usr/lib/jvm/java-1.5.0-sun-1.5.0.15/jre/lib/i386/xawt/libmawt.so(Java_sun_awt_X11GraphicsEnvironment_initDisplay+0x26)
 [0x926c4136]
[compc] #8 [0xb140f008]
[compc] #9 [0xb1408b6b]
[compc] #10 [0xb1408b6b]
[compc] #11 [0xb1406236]
[compc] #12 
/usr/lib/jvm/java-1.5.0-sun-1.5.0.15/jre/lib/i386/server/libjvm.so [0xb76aceac]
[compc] #13 
/usr/lib/jvm/java-1.5.0-sun-1.5.0.15/jre/lib/i386/server/libjvm.so [0xb787caa8]
[compc] #14 
/usr/lib/jvm/java-1.5.0-sun-1.5.0.15/jre/lib/i386/server/libjvm.so [0xb76accdf]
[compc] #15 
/usr/lib/jvm/java-1.5.0-sun-1.5.0.15/jre/lib/i386/server/libjvm.so(JVM_DoPrivileged+0x32d)
 [0xb770a7ed]
[compc] #16 
/usr/lib/jvm/java-1.5.0-sun-1.5.0.15/jre/lib/i386/libjava.so(Java_java_security_AccessController_doPrivileged__Ljava_security_PrivilegedAction_2+0x3d)
 [0xb73ba30d]
[compc] #17 [0xb140e898]
[compc] #18 [0xb1408a94]
[compc] #19 [0xb1406236]






Re: [flexcoders] compc: locking assertion failure

2008-09-26 Thread Maciek Sakrejda
So after some research, this seems to be a Sun JRE problem:

http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6532373

Any idea whether the assertion failure really is harmless, as it seems
to be? This seems to affect a number of Java programs for some people,
and some of them crash when the assertion is triggered. Is it safe to
just ignore it?

Thanks,
-- 
Maciek Sakrejda
Truviso, Inc.
http://www.truviso.com

-Original Message-
From: Maciek Sakrejda <[EMAIL PROTECTED]>
Reply-To: flexcoders@yahoogroups.com
To: flexcoders 
Subject: [flexcoders] compc: locking assertion failure
Date: Thu, 25 Sep 2008 18:38:00 -0700

Running compc after adding some embedded assets, I get the following
assertion failure. The build seems to finish fine, but this is somewhat
disconcerting. Any ideas?

[compc] Locking assertion failure. Backtrace:
[compc] #0 /usr/lib/libxcb-xlib.so.0 [0xb740d767]
[compc] #1 /usr/lib/libxcb-xlib.so.0(xcb_xlib_unlock+0x31) [0xb740d8b1]
[compc] #2 /usr/lib/libX11.so.6(_XReply+0xfd) [0x926071bd]
[compc]
#3 /usr/lib/jvm/java-1.5.0-sun-1.5.0.15/jre/lib/i386/xawt/libmawt.so
[0x926d9dce]
[compc]
#4 /usr/lib/jvm/java-1.5.0-sun-1.5.0.15/jre/lib/i386/xawt/libmawt.so
[0x926c3d77]
[compc]
#5 /usr/lib/jvm/java-1.5.0-sun-1.5.0.15/jre/lib/i386/xawt/libmawt.so
[0x926c3ef3]
[compc]
#6 
/usr/lib/jvm/java-1.5.0-sun-1.5.0.15/jre/lib/i386/xawt/libmawt.so(Java_sun_awt_X11GraphicsEnvironment_initDisplay+0x26)
 [0x926c4136]
[compc] #7 [0xb140f008]
[compc] #8 [0xb1408b6b]
[compc] #9 [0xb1408b6b]
[compc] #10 [0xb1406236]
[compc]
#11 /usr/lib/jvm/java-1.5.0-sun-1.5.0.15/jre/lib/i386/server/libjvm.so
[0xb76aceac]
[compc]
#12 /usr/lib/jvm/java-1.5.0-sun-1.5.0.15/jre/lib/i386/server/libjvm.so
[0xb787caa8]
[compc]
#13 /usr/lib/jvm/java-1.5.0-sun-1.5.0.15/jre/lib/i386/server/libjvm.so
[0xb76accdf]
[compc]
#14 
/usr/lib/jvm/java-1.5.0-sun-1.5.0.15/jre/lib/i386/server/libjvm.so(JVM_DoPrivileged+0x32d)
 [0xb770a7ed]
[compc]
#15 
/usr/lib/jvm/java-1.5.0-sun-1.5.0.15/jre/lib/i386/libjava.so(Java_java_security_AccessController_doPrivileged__Ljava_security_PrivilegedAction_2+0x3d)
 [0xb73ba30d]
[compc] #16 [0xb140e898]
[compc] #17 [0xb1408a94]
[compc] #18 [0xb1406236]
[compc]
#19 /usr/lib/jvm/java-1.5.0-sun-1.5.0.15/jre/lib/i386/server/libjvm.so
[0xb76aceac]
[compc] Locking assertion failure. Backtrace:
[compc] #0 /usr/lib/libxcb-xlib.so.0 [0xb740d767]
[compc] #1 /usr/lib/libxcb-xlib.so.0(xcb_xlib_lock+0x2e) [0xb740d81e]
[compc] #2 /usr/lib/libX11.so.6 [0x92606518]
[compc] #3 /usr/lib/libX11.so.6(XGetVisualInfo+0x26) [0x925fd0a6]
[compc]
#4 /usr/lib/jvm/java-1.5.0-sun-1.5.0.15/jre/lib/i386/xawt/libmawt.so
[0x926c30b9]
[compc]
#5 /usr/lib/jvm/java-1.5.0-sun-1.5.0.15/jre/lib/i386/xawt/libmawt.so
[0x926c3303]
[compc]
#6 /usr/lib/jvm/java-1.5.0-sun-1.5.0.15/jre/lib/i386/xawt/libmawt.so
[0x926c3fa1]
[compc]
#7 
/usr/lib/jvm/java-1.5.0-sun-1.5.0.15/jre/lib/i386/xawt/libmawt.so(Java_sun_awt_X11GraphicsEnvironment_initDisplay+0x26)
 [0x926c4136]
[compc] #8 [0xb140f008]
[compc] #9 [0xb1408b6b]
[compc] #10 [0xb1408b6b]
[compc] #11 [0xb1406236]
[compc]
#12 /usr/lib/jvm/java-1.5.0-sun-1.5.0.15/jre/lib/i386/server/libjvm.so
[0xb76aceac]
[compc]
#13 /usr/lib/jvm/java-1.5.0-sun-1.5.0.15/jre/lib/i386/server/libjvm.so
[0xb787caa8]
[compc]
#14 /usr/lib/jvm/java-1.5.0-sun-1.5.0.15/jre/lib/i386/server/libjvm.so
[0xb76accdf]
[compc]
#15 
/usr/lib/jvm/java-1.5.0-sun-1.5.0.15/jre/lib/i386/server/libjvm.so(JVM_DoPrivileged+0x32d)
 [0xb770a7ed]
[compc]
#16 
/usr/lib/jvm/java-1.5.0-sun-1.5.0.15/jre/lib/i386/libjava.so(Java_java_security_AccessController_doPrivileged__Ljava_security_PrivilegedAction_2+0x3d)
 [0xb73ba30d]
[compc] #17 [0xb140e898]
[compc] #18 [0xb1408a94]
[compc] #19 [0xb1406236]




 




Re: [flexcoders] URLRequest, ByteArray, and the 0 byte

2008-09-29 Thread Maciek Sakrejda
Hi all,

I've create the following ticket:

http://bugs.adobe.com/jira/browse/FP-708

It seems to be a core Flash Player issue, and not anything Flex-related,
but if you care about Linux Flash Player, I'm not above begging for
votes.
-- 
Maciek Sakrejda
Truviso, Inc.
http://www.truviso.com

-Original Message-----
From: Maciek Sakrejda <[EMAIL PROTECTED]>
Reply-To: flexcoders@yahoogroups.com
To: flexcoders 
Subject: [flexcoders] URLRequest, ByteArray, and the 0 byte
Date: Thu, 25 Sep 2008 12:36:10 -0700

I've run into an interesting problem with URLRequest, navigateToURL, and
ByteArray when sending a zero byte:

var bytes:ByteArray = new ByteArray();
bytes.writeByte(1);
bytes.writeByte(1);
bytes.writeByte(1);
bytes.writeByte(1);

requestHeader = new URLRequestHeader("Content-type",
"application/octet-stream");
// Where ../../test is just a valid dummy url--it doesn't matter what it
// actually does with the request
request:URLRequest = new URLRequest("../../test");
request.requestHeaders.push(header);
request.method = URLRequestMethod.POST;
request.data = bytes;
navigateToURL(request, "_blank");

I write four bytes above, because that seems to be a minimum for
URLRequest (if I write just one byte, the Content-Length header is set
to 4 anyway), but that's a separate issue.

If I change one of those

bytes.writeByte(1)

to

bytes.writeByte(0)

The byte array seems to be truncated to the location of that byte. In
general, any ByteArray sent as a data property payload of a URLRequest
seems to be truncated to the location of the first zero byte. I've
confirmed this by checking the Content-Length header of the POST request
(in fact, if the *first* byte is zero, the request seems to be turned
into a GET--which is even weirder).

I'm using FP 9.0.124.0 on Linux. I just tested on a colleague's machine,
and this seems to work fine in FP on Vista. Is this a known issue? Is
there any way around this?

-- 
Maciek Sakrejda
Truviso, Inc.
http://www.truviso.com




 




Re: [flexcoders] URLRequest, ByteArray, and the 0 byte

2008-09-29 Thread Maciek Sakrejda
We're also working around this by Base64-encoding, but this is clearly
less than ideal. It definitely seems like a Flash Player bug. We ran
into this when doing AlivePDF REMOTE saves (i.e., bouncing the file off
the server). Do you know when you ran into this, Troy? I tested our
particular problem on Windows and on OS X last week, and neither had the
issue. 

-- 
Maciek Sakrejda
Truviso, Inc.
http://www.truviso.com

-Original Message-
From: Troy Gilbert <[EMAIL PROTECTED]>
Reply-To: flexcoders@yahoogroups.com
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] URLRequest, ByteArray, and the 0 byte
Date: Mon, 29 Sep 2008 16:07:45 -0500

> The byte array seems to be truncated to the location of that byte. In
> general, any ByteArray sent as a data property payload of a URLRequest
> seems to be truncated to the location of the first zero byte. I've
> confirmed this by checking the Content-Length header of the POST
request
> (in fact, if the *first* byte is zero, the request seems to be turned
> into a GET--which is even weirder).

Just ran into a similar issue under OSX/Windows. If I tried to stick a
ByteArray into a URLVariables, no matter what combination of
operations I'd make, somewhere along the line it got converted to a
String and thus truncated at the first zero byte (because I assume
Flash uses null-terminated strings internally).

To fix it, I ended up encoding the data in Base64 before sticking it
into the URLVariables, which I think was actually a win over the
URL-encoding (e.g. %03%38%99...) anyway.

In regards to your POST/GET issue, Flash Player appears to convert
empty POSTs to GETs, which would explain why 0 has the first byte
(thus a zero-length data) would turn your POST into a GET.

Troy.



 




Re: [flexcoders] URLRequest, ByteArray, and the 0 byte

2008-09-30 Thread Maciek Sakrejda
That is not what the documentation says:

If the object is a ByteArray object, the binary data of the ByteArray
object is used as POST data. For GET, data of ByteArray type is not
supported. Also, data of ByteArray type is not supported for
FileReference.upload() and FileReference.download().

from
http://livedocs.adobe.com/flex/3/langref/flash/net/URLRequest.html#data

I was doing a POST with a ByteArray as the data. Again, this works
correctly under Windows and OS X, so I'm pretty sure this is a Player
bug under Linux.
-- 
Maciek Sakrejda
Truviso, Inc.
http://www.truviso.com

-Original Message-
From: jitendra jain <[EMAIL PROTECTED]>
Reply-To: flexcoders@yahoogroups.com
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] URLRequest, ByteArray, and the 0 byte
Date: Tue, 30 Sep 2008 09:13:59 +0530 (IST)


All the request data that is send is String. 
 
Thanks,

with Regards,
Jitendra Jain



- Original Message 
From: Troy Gilbert <[EMAIL PROTECTED]>
To: flexcoders@yahoogroups.com
Sent: Tuesday, 30 September, 2008 9:03:14 AM
Subject: Re: [flexcoders] URLRequest, ByteArray, and the 0 byte

> We're also working around this by Base64-encoding, but this is clearly
> less than ideal. It definitely seems like a Flash Player bug. We ran
> into this when doing AlivePDF REMOTE saves (i.e., bouncing the file
off
> the server). Do you know when you ran into this, Troy? I tested our
> particular problem on Windows and on OS X last week, and neither had
the
> issue.

// this byte array probably needs to be bigger to actually end up
// with a zero-byte in the compressed data
var bytes:ByteArray = new ByteArray();
bytes.writeUTFBytes ("This is just some filler text.");
bytes.compress( );

// URLVariables automatically encodes its dynamic properties
// using a www-form-url- encode format, i.e. %12%34%56%78% 90
var variables:URLVariab les = new URLVariables( );
variables.username = "troy";
variables.action = "save";
variables.data = bytes;

// when the request is made, 'variables' is converted to a string
// the nulls in the ByteArray are not escaped, so they truncate the data
var request:URLRequest = new URLRequest("http://mywebserver/ myscript.
php");
request.method = URLRequestMethod. POST;
request.data = variables;

// Troy.






Add more friends to your messenger and enjoy! Invite them now.


 




Re: [flexcoders] URLRequest, ByteArray, and the 0 byte

2008-09-30 Thread Maciek Sakrejda
Ah, interesting. This seems related, but different. I was just setting
URLRequest.data to a ByteArray directly. In your case, if I understand
application/x-www-form-urlencoded correctly, then zero bytes should just
be replaced with %00. Have you filed a bug? I'd like to add that to my
Adobe JIRA watch list if so.
-- 
Maciek Sakrejda
Truviso, Inc.
http://www.truviso.com

-Original Message-
From: Troy Gilbert <[EMAIL PROTECTED]>
Reply-To: flexcoders@yahoogroups.com
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] URLRequest, ByteArray, and the 0 byte
Date: Mon, 29 Sep 2008 22:33:14 -0500

> We're also working around this by Base64-encoding, but this is clearly
> less than ideal. It definitely seems like a Flash Player bug. We ran
> into this when doing AlivePDF REMOTE saves (i.e., bouncing the file
off
> the server). Do you know when you ran into this, Troy? I tested our
> particular problem on Windows and on OS X last week, and neither had
the
> issue.

// this byte array probably needs to be bigger to actually end up
// with a zero-byte in the compressed data
var bytes:ByteArray = new ByteArray();
bytes.writeUTFBytes("This is just some filler text.");
bytes.compress();

// URLVariables automatically encodes its dynamic properties
// using a www-form-url-encode format, i.e. %12%34%56%78%90
var variables:URLVariables = new URLVariables();
variables.username = "troy";
variables.action = "save";
variables.data = bytes;

// when the request is made, 'variables' is converted to a string
// the nulls in the ByteArray are not escaped, so they truncate the data
var request:URLRequest = new
URLRequest("http://mywebserver/myscript.php";);
request.method = URLRequestMethod.POST;
request.data = variables;

// Troy.



 




Re: [flexcoders] URLRequest, ByteArray, and the 0 byte

2008-09-30 Thread Maciek Sakrejda
I'm not sure I agree--if it's a "feature" of the implementation that
prevents valid use of the API, that sounds like a bug ;). As far as I
can tell, a null byte should be encoded to %00 in the
application/x-form-urlencoded scheme and is a valid character. If
calling toString() on a ByteArray truncates it, then the implementation
shouldn't be doing that. String does seem to handle null bytes correctly
in other cases (try trace(String.fromCharCode(1,0,2).length) ), so there
should be no problem here.

Also:

> It does work correctly if you set URLRequest.data to a ByteArray

Not in Linux Flash Player--that was my original point.

Thanks for the feedback, though--it's always interesting to dive into
this low-level stuff.
-- 
Maciek Sakrejda
Truviso, Inc.
http://www.truviso.com

-Original Message-
From: Troy Gilbert <[EMAIL PROTECTED]>
Reply-To: flexcoders@yahoogroups.com
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] URLRequest, ByteArray, and the 0 byte
Date: Tue, 30 Sep 2008 11:57:09 -0500

> Ah, interesting. This seems related, but different. I was just setting
> URLRequest.data to a ByteArray directly. In your case, if I understand
> application/x-www-form-urlencoded correctly, then zero bytes should
just
> be replaced with %00. Have you filed a bug? I'd like to add that to my
> Adobe JIRA watch list if so.

It does work correctly if you set URLRequest.data to a ByteArray, but
in my example I was setting URLVariables.data (which could be called
anything, it's just a named property) to a ByteArray, and URLVariables
(apparently) calls toString on each property's value *before*
URL-encoding them, which is the problem. So, not necessarily a bug,
just an undocumented "feature" of the implementation. Since
URLVariables does the encoding, I expected/assumed (since it wasn't
explicitly documented) it would it encode the ByteArray as bytes, %00
and all.

Troy.



 




Re: [flexcoders] Re: AS3 within eclipse with Flex SDK

2008-10-01 Thread Maciek Sakrejda
There's also FlashDevelop:

http://www.flashdevelop.org/wikidocs/index.php?title=Features

I've never used it, but a friend used SharpDevelop, which it seems to
have been based on, and was quite happy with it.

-- 
Maciek Sakrejda
Truviso, Inc.
http://www.truviso.com

-Original Message-
From: gabriela.perry <[EMAIL PROTECTED]>
Reply-To: flexcoders@yahoogroups.com
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: AS3 within eclipse with Flex SDK
Date: Wed, 01 Oct 2008 16:09:32 -

Hi, Tom.
The mxml xsd I found at falkens web, so mxml code hinting is not an
issue.
I didnt know the FDT, but is almost the same price as the builder... I
advised them to buy it... 
Thanks everyone for the (extremely fast!) replies.
Gabi :0)




 




Re: [flexcoders] Re: Open pdf from ByteArray in new browser window (not AIR)

2008-10-01 Thread Maciek Sakrejda
You can use a very similar mechanism for any type of file. Take a look
at the PDF.save() method (the REMOTE part) in AlivePDF source code.
-- 
Maciek Sakrejda
Truviso, Inc.
http://www.truviso.com

-Original Message-
From: Stanislav Aytuganov <[EMAIL PROTECTED]>
Reply-To: flexcoders@yahoogroups.com
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Open pdf from ByteArray in new browser window
(not AIR)
Date: Wed, 01 Oct 2008 16:20:17 -

But problem is that I have to open not just .pdf file but also .xsl 
and .xml files.
Any ideas to do it without servlet?

--- In flexcoders@yahoogroups.com, "Stanislav Aytuganov" 
<[EMAIL PROTECTED]> wrote:
>
> No I haven't But will try right now Thanks
> --- In flexcoders@yahoogroups.com, "valdhor"  wrote:
> >
> > Have you checked out AlivePDF (http://alivepdf.bytearray.org/?
> page_id=2)
> > 
> > 
> > --- In flexcoders@yahoogroups.com, "Stanislav Aytuganov"
> >  wrote:
> > >
> > > Hello group!
> > > I have an object containing byte array of pdf file.
> > > Can I open the new browser window that will render this byte 
array 
> to
> > > pdf file
> > > Thanks.
> > >
> >
>




 




Re: [flexcoders] SecurityError #2048 20 seconds after Socket closure.

2008-10-02 Thread Maciek Sakrejda
Samuel,

Don't know if this is helpful, but when working with URLStream, we ran
into a situation where calling close() did not actually do anything
(i.e., it did not issue a TCP FIN--we watched for this with tcpdump). We
did not encounter any security errors, so I don't know if this is
related, but I think the easiest way to figure out what's going on might
be to break out something like tcpdump or Wireshark...
-- 
Maciek Sakrejda
Truviso, Inc.
http://www.truviso.com

-Original Message-
From: Samuel Loretan <[EMAIL PROTECTED]>
Reply-To: flexcoders@yahoogroups.com
To: flexcoders@yahoogroups.com
Subject: [flexcoders] SecurityError #2048 20 seconds after Socket
closure.
Date: Thu, 02 Oct 2008 11:48:22 -

Hello,

I've met a very unexpected problem with a Socket connection. I'm very 
used to client-server communication, and it's the first time I 
encounter such behaviour.

I have an AS3 application, connected to a custom Java server using the 
Socket class.

The server is run on a distant computer (let's say its hostname is 
'javaserver'), listening on port , along with a crossdomain server 
which deliver an authorization XML on port 843 ().

On the client computer, I have a FlashPlayerTrust file that allow my 
SWF to be on the Trusted sandbox.

The connection works just fine. I can send and receive binary data 
perfectly. At a given time in my communication exchange, the server 
closes the socket.

The CLOSE event is thrown in my Flash application correctly.

But 20 seconds after that (precisely 20s), my closed connection throws 
a SecurityError #2048 :

> Error#2048: Security Sandbox violation. Cannot load resource from 
javaserver:.

I can't figure why this is happening. In my experience, and according 
to the documentation, a SecurityError (or a SECURITY_ERROR event, if 
listened) can be thrown only when using connect() with a non-
authorized distant host (which is not the case, since my SWF is in the 
Trusted sandbox), or while connecting to a port below 1024 on a Web 
execution context (which is not my case, since I use a connection to 
the port , using a Standalone player).

This problem is happening with the Standalone Flash Player 10.0.0 
b591, but also with the Player 9.0.124.

Any idea?

Thank you very much.




 




Re: [flexcoders] Prototyping a form

2008-10-02 Thread Maciek Sakrejda
It's possible if you tell us the compilation errors you're hitting.
However, in this case, you're probably hitting something telling you
that you can't override something not marked for override, so you need
to add the 'override' keyword to the completeParameters() function
definition.

-- 
Maciek Sakrejda
Truviso, Inc.
http://www.truviso.com

-Original Message-
From: markgoldin_2000 <[EMAIL PROTECTED]>
Reply-To: flexcoders@yahoogroups.com
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Prototyping a form
Date: Thu, 02 Oct 2008 20:41:15 -

Lets' say I want all my forms to be based on same form. Base form 
would have just a push button. A click of this button might look like 
this:

runButton.addEventListener("click", handleClick);
private function handleClick(e:MouseEvent):void
{
completeParameters();
mainApp.reportArea.source = runStrng;
}

I am subclassing main form in mxml. That might look like this:




...

It fails at completeParameters(); during compilation.
Is it possible to have such design working?

Thanks




 




Re: [flexcoders] Re: Prototyping a form

2008-10-02 Thread Maciek Sakrejda
Ok, what's the context here? If this is the error, it could be that
you're not defining the method in the parent form. This is true even if
the method doesn't do anything and *must* be overridden in child
forms--most object-oriented languages provide the 'abstract' keyword to
ensure this, but ActionScript doesn't. Then specify the 'override'
keyword on child forms as I mentioned before.

If this still isn't it, can you please post the parent and child forms
for context?
-- 
Maciek Sakrejda
Truviso, Inc.
http://www.truviso.com

-Original Message-
From: markgoldin_2000 <[EMAIL PROTECTED]>
Reply-To: flexcoders@yahoogroups.com
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Prototyping a form
Date: Thu, 02 Oct 2008 21:15:48 -

1180: Call to a possibly undefined method completeParameters.

--- In flexcoders@yahoogroups.com, Maciek Sakrejda <[EMAIL PROTECTED]> 
wrote:
>
> It's possible if you tell us the compilation errors you're hitting.
> However, in this case, you're probably hitting something telling you
> that you can't override something not marked for override, so you 
need
> to add the 'override' keyword to the completeParameters() function
> definition.
> 
> -- 
> Maciek Sakrejda
> Truviso, Inc.
> http://www.truviso.com
> 
> -Original Message-
> From: markgoldin_2000 <[EMAIL PROTECTED]>
> Reply-To: flexcoders@yahoogroups.com
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Prototyping a form
> Date: Thu, 02 Oct 2008 20:41:15 -
> 
> Lets' say I want all my forms to be based on same form. Base form 
> would have just a push button. A click of this button might look 
like 
> this:
> 
> runButton.addEventListener("click", handleClick);
> private function handleClick(e:MouseEvent):void
> {
> completeParameters();
> mainApp.reportArea.source = runStrng;
> }
> 
> I am subclassing main form in mxml. That might look like this:
> 
> 
> 
> 
> ...
> 
> It fails at completeParameters(); during compilation.
> Is it possible to have such design working?
> 
> Thanks
>




 




Re: [flexcoders] Re: Matching n groups with a regex?

2008-10-03 Thread Maciek Sakrejda
Josh,

For what it's worth, \w will match '_' (it's true of REs pretty much
everywhere, and I just tried and as3 is the same). I played around with
your example a bit, but I can't offer any more insight. The closest I
got would leave stray '.'s on the ends of the matches, and you'd have to
clean those up manually anyway. I need to learn lookahead...

Alternately, you could String.split('.') and validate the individual
tokens.
-- 
Maciek Sakrejda
Truviso, Inc.
http://www.truviso.com

-Original Message-
From: Josh McDonald <[EMAIL PROTECTED]>
Reply-To: flexcoders@yahoogroups.com
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Re: Matching n groups with a regex?
Date: Fri, 3 Oct 2008 17:52:42 +1000

I need to do two things:

1: make sure the string matches /^[a-zA-Z0-9_]+(?:\.[a-zA-Z0-9_]+)+$/
2: extract all the individual words (not the dots)

I Can't use \w because it doesn't match "_".

At the moment I'm just using String.split(".") after using the regexp to
test validity. 

-Josh

On Fri, Oct 3, 2008 at 5:19 PM, mookie298347 <[EMAIL PROTECTED]>
wrote:
Hmm, maybe I am not understanding your needs.


My pattern works on your example of
"*&%*&^objectA()*&)(*&908objectB,objectC"

The resulting array contains:
objectA
908objectB
objectC

Which is what I thought you wanted.


Also, the problem in your RE *is* the non-capturing group which
is
consuming your 'objectB.' You can verify this by using a
lookahead
assertion (?=) instead of the noncapture (?:) group.

var patt:RegExp = /([a-zA-Z0-9_]+)(?=\.?(?:[a-zA-Z0-9_]*))/g;

This pattern results in the same output as my simple pattern
using
lookahead assertions.

If these aren't the results you were looking for let me know and
I can
take another look.

HTH

Rob

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

> That will also match "*&%*&^objectA()*&)(*&908objectB,objectC"
as
well which
> isn't what I'm trying to do.
>
> Like I said in the first post, I also tried throwing out the
non-matching
> group altogether and simply trying to get
["objectA",".objectB",".objectC"]
> and discarding the dots in the loop (not nice, but better than
not
working
> at all), and it didn't work. So I don't think the problem is
that it's
> wrapped in a non-matching group.
>


> On Fri, Oct 3, 2008 at 11:34 AM, mookie298347 <[EMAIL PROTECTED]>
wrote:
>
> > Hi Josh,
> >
> > Your match is skipping over objectB because it is being
"consumed"
> > (and not captured) by this part of your regular expression:
> >
> > (?:\.([a-zA-Z0-9_]+))+
> >
> > If you simply want to match all word characters between dots
you can
> > simply do:
> >
> >var str:String = 'objectA.objectB.objectC';
> >var patt:RegExp = /\w+/g;
> >var matches:Object = str.match(patt);
> >trace(ObjectUtil.toString(matches));
> >
> > This captures all consecutive word character groups in the
string.
> >
> > HTH
> >
> > Cheers,
> > Rob
> >
> >
> > --- In flexcoders@yahoogroups.com, "Josh McDonald" 
wrote:
> > >
> > > Hey guys,
> > >
> > > I'm trying to turn this "objectA.objectB.objectC" into
["objectA",
> > > "objectB", "objectC"] using a regex, but all I seem to get
using
> > > String.match() is ["objectA", "objectC"]. Can anybody tell
me what's
> > wrong
> > > with the following?
> > >
> > > const multiLevelReferencePattern : RegExp =
> > > /([a-zA-Z0-9_]+)(?:\.([a-zA-Z0-9_]+))+/;
> > >
> > > I also tried to match into ["objectA", ".objectB",
".objectC"] by
   

Re: [flexcoders] skinClass in external library

2008-10-08 Thread Maciek Sakrejda
Short answer: no.

Longer answer: What exactly are you trying to do? You're defining assets
in an external swc, configuring your swf to use those assets, but you
don't want a dependency on the swc? That doesn't really make any sense:
the embedded skin "lives in" the swc. What do you expect to happen when
the swf references assets that are not there?
-- 
Maciek Sakrejda
Truviso, Inc.
http://www.truviso.com

-Original Message-
From: albert.imaxel <[EMAIL PROTECTED]>
Reply-To: flexcoders@yahoogroups.com
To: flexcoders@yahoogroups.com
Subject: [flexcoders] skinClass in external library
Date: Wed, 08 Oct 2008 11:24:16 -

My scenario:

I have a flex builder workspace with the main flex application, and
many flex libraries which are linked to the main flex app.
One of that libraries contains the assets, styleSheets... it's the
theme library.
In the stylesheet file of this library, there are some styles defined
which use the Embed(skinClass='') directive, this skin
classes are in a swc file created with flash. This swc file is added
to the build path of the theme library.
Some of this styles are used in the main flex app.

When I try to compile the whole thing, I got a "class for skin
'' not found" error from the main app.
If I compile the theme library only, i got no errors.

The only solution I've found is to add the swc file to the build path
of the main app.

But, and here is my question: I don't want my main flex app to depend
on the swc file. Is there any way I can accomplish that?




 




Re: [flexcoders] Re: skinClass in external library

2008-10-08 Thread Maciek Sakrejda
Ah, I see. I didn't realize that's what Albert was asking ("I don't want
my main flex app to depend on the swc file."). If that's the case, then
yes--he can compile the resources into a SWF and depend on any SWF that
delivers all the relevant resources, not specifically just that one.

Thanks for the clarification.


-Original Message-
From: Adnan Doric <[EMAIL PROTECTED]>
Reply-To: flexcoders@yahoogroups.com
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: skinClass in external library
Date: Wed, 08 Oct 2008 16:28:10 -

It is possible using ANT scripts and  to compile your
CSS sheet containing skinClass reference.

Maciek, dependency can be satisfied with style sheets loaded at
runtime. This way you can change skin without recompiling your
application.

Cheers.

--- In flexcoders@yahoogroups.com, Maciek Sakrejda <[EMAIL PROTECTED]>
wrote:
>
> Short answer: no.
> 
> Longer answer: What exactly are you trying to do? You're defining
assets
> in an external swc, configuring your swf to use those assets, but you
> don't want a dependency on the swc? That doesn't really make any
sense:
> the embedded skin "lives in" the swc. What do you expect to happen
when
> the swf references assets that are not there?
> -- 
> Maciek Sakrejda
> Truviso, Inc.
> http://www.truviso.com
> 
> -Original Message-
> From: albert.imaxel <[EMAIL PROTECTED]>
> Reply-To: flexcoders@yahoogroups.com
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] skinClass in external library
> Date: Wed, 08 Oct 2008 11:24:16 -
> 
> My scenario:
> 
> I have a flex builder workspace with the main flex application, and
> many flex libraries which are linked to the main flex app.
> One of that libraries contains the assets, styleSheets... it's the
> theme library.
> In the stylesheet file of this library, there are some styles defined
> which use the Embed(skinClass='') directive, this skin
> classes are in a swc file created with flash. This swc file is added
> to the build path of the theme library.
> Some of this styles are used in the main flex app.
> 
> When I try to compile the whole thing, I got a "class for skin
> '' not found" error from the main app.
> If I compile the theme library only, i got no errors.
> 
> The only solution I've found is to add the swc file to the build path
> of the main app.
> 
> But, and here is my question: I don't want my main flex app to depend
> on the swc file. Is there any way I can accomplish that?
>




 




Re: [flexcoders] Problem using SDK Version 3.1...

2008-10-10 Thread Maciek Sakrejda
My guess is that you have malformed (or at least questionably-formed)
MXML somewhere (and Flex 3.0 was more lenient about it). Are you sure
you don't have garbage at the beginning of some MXML file or something
like that? Can you validate it through an external XML editor (sorry
don't know any on Mac)?
-- 
Maciek Sakrejda
Truviso, Inc.
http://www.truviso.com

-Original Message-
From: Rob Kunkle <[EMAIL PROTECTED]>
Reply-To: flexcoders@yahoogroups.com
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Problem using SDK Version 3.1...
Date: Fri, 10 Oct 2008 01:46:57 -0400

When I switch from using SDK v3.0.3 to v3.1, I can't compile my 
projects. The following "problem" shows up for the project. Has anyone 
else come across this or know how to resolve this?



 

Thanks!
Rob







Re: [flexcoders] Java-like equals() method?

2008-10-13 Thread Maciek Sakrejda
Frank,

There's no .equals() in actionscript unless you implement it yourself.
Without hearing more about the context, it's hard to tell whether
Jitendra's data binding solution would work for this specific problem
(data binding would effectively set the list selection to an object that
is not in the list--I'm not sure what happens there), but you might run
into a need for .equals() further down the line. We did, and since all
of our VOs inherit from one VO base object, we just implement .equals()
in these as necessary. It seems rather horrifying that there's
no .equals() at first, but you don't really need it that often...

-- 
Maciek Sakrejda
Truviso, Inc.
http://www.truviso.com

-Original Message-
From: frank_sommers <[EMAIL PROTECTED]>
Reply-To: flexcoders@yahoogroups.com
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Java-like equals() method?
Date: Sat, 11 Oct 2008 02:54:18 -

Hi, 

I've been searching for a good solution to implementing object equality.
I'm familiar with 
ObjectUtil, etc., but it still makes things harder than they should be. 

It may be best to illustrate this with an example. Suppose I have a
ComboBox with an 
ArrayCollection as a data provider. The ArrayCollection is populated
with value objects 
from the server, e.g., User objects. Suppose that I have a Task class,
and a Task may 
have an assignedToUser property, which is a User instance. When the
someone selects a 
Task (say, in a master-detail view), I would like the ComboBox to set
its selectedItem to 
the user for the given Task, i.e., combBox.selectedItem =
myUser.assignedToUser.

The problem is that no Task in the ComboBox's data provider and the
User's 
assignedToUser property are ever equal using the == or === operators. 

So I would like to implement a custom equality for User, and have the
ComboBox use that 
to set its selectedItem to the specified user. In Java, this is easily
done by overriding the 
equals() and hashCode() methods of User. 

Any suggestions on how to achieve something similar in Flex would be
much appreciated.

Thanks, 

-- Frank 




 




  1   2   3   4   >