[flexcoders] Proxying RMPTS in a DMZ

2008-01-26 Thread Josh VanderBerg
I have a situation where I need to make a tomcat web server running
LCDS accessible on the internet.  Our flex application talks to the
web server over https for Remote Object AMF requests, and over RMTPS
using the messaging protocol for push.

I don't want to put the web server in the DMZ, for security reasons,
so the most obvious solution is a reverse proxy in the DMZ.  With a
previous flex app we've used the tomcat redirector, which works fine
for http based AMF requests, but it won't work for RMTPS, as this is a
persistent socket connection, with its own protocol that the tomcat
redirector doesn't understand.

I haven't been able to find much in the way of documentation on this
topic on the Adobe website.  I did find mention of deploying another
Adobe enterprise app that uses RMTP using SSL accelerators in the DMZ,
but I am not sure this will work with flex.

I was wondering if anybody out there has successfully configured such
a solution to proxy AMF and RMTP request from a DMZ.



[flexcoders] Re: DataServices destinations design dilemma...

2007-12-15 Thread Josh VanderBerg
I tend to eschew implementing inheritance in data model that needs to
be persisted to a database - preferring (in this example) instead to
overload PetVO with all of the possible pet properties and give it a
petType property.  Regardless of whether or not you implement
inheritance, the PetVO must have a property:

  public var friends : ArrayCollection;

In the database you will have to have a table something like the following

PetRelationship

   relationship_id   INT (Autonumber) - surrogate key
   pet_id  INT - FK Pet table
   friend_id   INT - FK Pet table

And use it to do your data services mapping, and map it appropriately
in Hibernate as well (if that's what you are using).  You could
optionally expose this object as an endpoint itself, so it would be
the home of the friends lists.  In this case the PetVO would just
have a property:

public var relationship : PetRelationship;

And your mapped PetRelationShipVO would store the ArrayCollection of
friends.

Now, the application of either would be relatively obvious in the case
where you don't implement inheritance in the datamodel.  I am sure
there is a way to do it with inheritance - I've just never done it -
but the approach would be similar, you really need a many-to-many
mapping table at the PetVO level.

__
Josh Vanderberg - vanderblog.typepad.com

--- In flexcoders@yahoogroups.com, Kevin [EMAIL PROTECTED] wrote:

 DataServices experts,
 
 We are currently stumped on how to configure our data-management  
 config to address a very specific data model that we have.  I would  
 love to get some ideas/feedback on how to solve this dilemma.  Here  
 is our problem (as simplified as possible).
 
 We have a number of objects that extend a root object like so:
 
 PetsVO(root object)
 extended by:
 - DogVO
 - CatVO
 - BirdVO
 - FishVO
 - RatVO
 
 Here is the problem.  Each object can hold a collection of pet's  
 objects.  So in a social networking way, each pet can be linked to  
 its pet friends.
 DogVO
 - holds collection of PetVO's
 CatVO
 - holds collection of PetVO's
 BirdVO
 - holds collection of PetVO's
 ... you get the idea.
 
 So, how do with deal with this in our destinations??
 
 Option 1) Hierarchical management.
 - This works conceptually of course since no association tags are  
 required to link the destinations together.  However, we then have  
 major scaling issues  no way to throttle individual destinations,  
 etc... Not really a working solution unless your model was truly as  
 simple as the one I am describing.
 
 Option 2) Use destinations to manage relationships.
 
 We set up destinations for each of these sub classes:
 dogs
 cats
 birds
 fish
 rats
 
 However, how do we associate the PetVO collection in each?
 
 many-to-many property=pets destination=??? lazy=true /
 
 THOUGHT 1: If we have a pets destination and set up a many-to-many  
 tag from dogs to pets then we create the problem where we are  
 managing the same object in two different places.  Plus when we add a  
 CatVO to a pets collection in a dogs destination (as an  
 example) DataServices initializes a createItem in the pets  
 destination not knowing that the object already exists as part of the  
 cats destination...not good.
 
 THOUGHT 2:  We could set up a many-to-many tag in dogs to  
 cats...however this obviously won't work when someone then adds a  
 BirdVO to the collection.
 
 What to do?... I realize this is a silly example, but hopefully it  
 illustrates the problem of integrating an object model which uses a  
 lot of Base or Root objects into DataServices.
 
 Is there something we are missing or not understanding about how we  
 could set this up?  I would be interested to see if anyone has any  
 solutions.
 
 (I should note that we are using Hibernate with Annotations.)
 
 Thanks for your help we look forward to any of your ideas,
 
 Kevin





[flexcoders] Re: Real world usage of Flex

2007-11-20 Thread Josh VanderBerg
webmessenger.yahoo.com is a flex app, as is the yahoo charts beta -
http://finance.yahoo.com/charts.  Though if you don't consider yahoo
maps to be real world I am not sure these will meet your criteria.

Also, Google's Street View utilizes flex in some fashion, if the
error messages I've gotten when it crashes are any indication :)

--
Josh Vanderberg -- vanderblog.typepad.com

--- In flexcoders@yahoogroups.com, real_yoni [EMAIL PROTECTED] wrote:

 Hi All,
 
 I'm looking for real world usage of Flex (other than maps.yahoo.com 
 and harley-davidson)? can publish links?
 
 Thanks,
 
 p.s.
 I'm not entirely sure that this is the right group to ask this 
 question so please refer me to the right one if you can.
 
 Yoni





[flexcoders] Re: Where is the Debugger or Profiler?

2007-11-20 Thread Josh VanderBerg
This happens if you are running the debug version of the player and
launch the debug version of the html wrapper, but didn't launch your
swf from flex player in debug mode.  For example, if you just access
access the URL for the -debug html wrapper directly in a browser
you'll get this popup.

The solution is to either launch from flex builder if you intend to
debug, or access the non-debug html wrapper.  You might check you
Eclipse launch configurations to make sure that they are pointing to
the right html wrappers.

__
Josh Vanderberg - http://vanderblog.typepad.com



--- In flexcoders@yahoogroups.com, Tim Ashworth [EMAIL PROTECTED] wrote:

 Hi all,
  
 Not a major one this, but I keep getting the Where is the Debugger or
 profiler running? alert when I run my app.  I've got a development
machine
 running CF8 as a standalone and Apache 2.0.  I'm developing straight
into
 the htdocs folder.  All is running fine, all the code works, I can
connect
 to data and wierdly (well I think it's weird) I don't get the error
when I
 am actually debugging the app.
  
 I'm using Flex Builder 3 beta 2.  
  
 I'd really like to nail this as it's now driving me mad.
  
 Cheers in advance,
  
 Tim





[flexcoders] Re: Air/Flex App With Barcode Reader

2007-11-20 Thread Josh VanderBerg
Define a keyDown event handler at the application level.  Because of
the Flex 2.0 event model, all keydown events, from all controls,
should bubble up to the Application.  Here is a little application I
made to test this.  The bottom text area will show all keys typed, no
matter the control that has the focus when the key was pressed.

?xml version=1.0 encoding=utf-8?
mx:Application keyDown=keyCapture(event)
xmlns:mx=http://www.adobe.com/2006/mxml; layout=vertical

mx:Script
![CDATA[
private function keyCapture(event: KeyboardEvent) : 
void {
allKeys.text += 
String.fromCharCode(event.charCode);
}
]]
/mx:Script

mx:Label text=Text1 /
mx:TextArea id=textArea height=200 width=200 /
mx:Label text=Text2 /
mx:TextInput id=textInput /
mx:Label text=Button: /
mx:Button label=Set Focus here /

mx:Label text=Key Capture /
mx:TextArea selectable=false id=allKeys width=400 height=400 /

/mx:Application

__
Josh Vanderberg -- http://vanderblog.typepad.com

--- In flexcoders@yahoogroups.com, Chad Gray [EMAIL PROTECTED] wrote:

 Hello,
 
 I am just doing research and need some input.
 
 We would like to make an Air/Flex app that when you scan in a
barcode you get product details from a database that CF is serving out.
 
 The barcode scanner works like a key board and at the end of a scan
I can have it send a carriage return.  I don't want the user to have
to put focus on a text input field then scan the barcode to get a
result.  I want them so that any keyboard entry from the scanner will
always pull up product details upon the carriage return.
 
 It does not matter what section of the Appliction they are in.  If
text entry is present from the barcode scanner then I want to return
product details from the database.
 
 Has anyone built an app that works with a barcode reader in this way?
 
 Any quick code suggestions on capturing the text input from the
barcode reader?
 
 Thanks!





SPAM-LOW: [flexcoders] Re: Air/Flex App With Barcode Reader

2007-11-20 Thread Josh VanderBerg
If you call addEventListener with useCapture=true, the listener will
trap events that don't usually bubble.  I've verified that it works
even when the focus is on a tab bar.

The one issue is that after the application starts *nothing* has focus
- but once you click on anything, even a component that doesn't
normally respond to keyboard events, the centralized listener will
start getting key events.


__
Josh Vanderberg -- http://vanderblog.typepad.com

--- In flexcoders@yahoogroups.com, Jeffry Houser [EMAIL PROTECTED] wrote:

 
   Conceptually this sounds good.  However, I would expect this method 
 would be non-intuitive to users.
 
   Containers will not broadcast keyboard events on their own, so the 
 user must have have given focus to a component that will broadcast the 
 keyboard events.  I believe there are a lot of situations, such as 
 changing the selectedIndex of a ViewStack or tabbing through a 
 TabNavigator where nothing will be given focus and the bar code scan 
 would be ignored.
 
 
 
 Josh VanderBerg wrote:
  
  
  Define a keyDown event handler at the application level. Because of
  the Flex 2.0 event model, all keydown events, from all controls,
  should bubble up to the Application. Here is a little application I
  made to test this. The bottom text area will show all keys typed, no
  matter the control that has the focus when the key was pressed.
  
  ?xml version=1.0 encoding=utf-8?
  mx:Application keyDown=keyCapture(event)
  xmlns:mx=http://www.adobe.com/2006/mxml 
  http://www.adobe.com/2006/mxml layout=vertical
  
  mx:Script
  ![CDATA[
  private function keyCapture(event: KeyboardEvent) : void {
  allKeys.text += String.fromCharCode(event.charCode);
  }
  ]]
  /mx:Script
  
  mx:Label text=Text1 /
  mx:TextArea id=textArea height=200 width=200 /
  mx:Label text=Text2 /
  mx:TextInput id=textInput /
  mx:Label text=Button: /
  mx:Button label=Set Focus here /
  
  mx:Label text=Key Capture /
  mx:TextArea selectable=false id=allKeys width=400
height=400 /
  
  /mx:Application
  
  __
  Josh Vanderberg -- http://vanderblog.typepad.com 
  http://vanderblog.typepad.com
  
  --- In flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com, 
  Chad Gray cgray@ wrote:
   
Hello,
   
I am just doing research and need some input.
   
We would like to make an Air/Flex app that when you scan in a
  barcode you get product details from a database that CF is serving
out.
   
The barcode scanner works like a key board and at the end of a scan
  I can have it send a carriage return. I don't want the user to have
  to put focus on a text input field then scan the barcode to get a
  result. I want them so that any keyboard entry from the scanner will
  always pull up product details upon the carriage return.
   
It does not matter what section of the Appliction they are in. If
  text entry is present from the barcode scanner then I want to return
  product details from the database.
   
Has anyone built an app that works with a barcode reader in
this way?
   
Any quick code suggestions on capturing the text input from the
  barcode reader?
   
Thanks!
   
  
  
 
 -- 
 Jeffry Houser, Technical Entrepreneur, Software Developer, Author, 
 Recording Engineer
 AIM: Reboog711  | Phone: 1-203-379-0773
 --
 My Company: http://www.dot-com-it.com
 My Podcast: http://www.theflexshow.com
 My Blog: http://www.jeffryhouser.com





[flexcoders] Re: Debugging who changed data...

2007-11-19 Thread Josh VanderBerg
Not sure if you've tried this, but you can set a breakpoint on a
variable declaration, and the debugger will stop when the property is
accessed or changed.

--
Josh Vanderberg
vanderblog.typepad.com -- Flex blog and open source flex components

--- In flexcoders@yahoogroups.com, bithroop [EMAIL PROTECTED] wrote:

 I have a property that is getting changed and I'm having a really hard
 time figuring out where it's happening and who is doing it. The
 debugger is walking me pretty far into the SDK and events are firing
 off and ultimately it's hard to tell. Anyone have any tricks for this?





[flexcoders] Re: Garbage Collection question

2007-11-19 Thread Josh VanderBerg
I've read that the GC runs only on allocation.  Can't seem to find the
original article I read on this, but this livedoc reference appears to
agree:
http://livedocs.adobe.com/labs/flex3/html/help.html?content=profiler_6.html

__
Josh Vanderberg
vanderblog.typepad.com - Flex blog and open source flex components

--- In flexcoders@yahoogroups.com, Mike Krotscheck [EMAIL PROTECTED]
wrote:

 I've been digging into memory management techniques recently, and have a
 question regarding the timing of the two methods. The articles on
 Adobe.com suggest that both methods (Ref Count and Mark  Sweep) run at
 some arbitrary point in the future defined by current memory usage. I
 found a discussion about the Virtual Machine though that indicated
 garbage collection happens on a 30ms interval.
 
  
 
 These two suggest that the two methods run on different intervals, and
 given that Mark and Sweep is more processor intensive I assume that it
 is the one whose timing is triggered by memory usage, while Reference
 counting operates on the mentioned 30ms. Is that correct?
 
  
 
 Links:
 
 http://www.adobe.com/devnet/flashplayer/articles/garbage_collection.html
 
 (some point in the future)
 
 http://techpolesen.blogspot.com/2007/11/avm2-vs-jvm-and-actionscript3.ht
 ml
 
 (30ms time slice)
 
  
 
 Michael Krotscheck
 
 Senior Developer
 
  
 RESOURCE INTERACTIVE
 
 http://www.resource.com/ www.resource.com http://www.resource.com 
 
 [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] 
 
  
 
 
 
 This email and any of its attachments may contain Resource Interactive
 proprietary information, which is privileged, confidential and may be
 subject to copyright or other intellectual property rights belonging to
 Resource Interactive. This email is intended solely for the use of the
 individual or entity to which it is addressed. If you are not the
 intended recipient of this email, you are hereby notified that any
 dissemination, distribution, copying or action taken in relation to the
 contents of and attachments to this email is strictly prohibited and may
 be unlawful. If you have received this email in error, please notify the
 sender immediately and permanently delete the original and any copy of
 this email and any printout.





[flexcoders] Re: Viewstack problems

2007-11-19 Thread Josh VanderBerg

Try setting the creationPolicy='all' on the viewstack and perhaps the
canvases as well.

--
Josh Vanderberg
vanderblog.typepad.com - Flex blog and open source flex components

--- In flexcoders@yahoogroups.com, Rafael Faria
[EMAIL PROTECTED] wrote:

 Hello all,
 
 I'm having a big trouble with a viewstack.
 
 I have this code
 
   mx:ViewStack id=vstack width=800 height=400
   
   mx:Canvas id=step1 label=donor information
   mx:HBox
   mx:Canvas id=step1_1 width=390 /
   mx:Canvas id=step1_2 width=375 /
   /mx:HBox
   /mx:Canvas
   
   mx:Canvas id=step2 label=call status
   mx:HBox
   mx:Canvas id=step2_1 width=390 /
   mx:Canvas id=step2_2 width=375 /
   /mx:HBox
   /mx:Canvas
   
   mx:Canvas id=step3 label=contribution information
   mx:HBox
   mx:Canvas id=step3_1 width=390 /
   mx:Canvas id=step3_2 width=375 /
   /mx:HBox
   /mx:Canvas
   
   /mx:ViewStack
 
 and an init actionscript which i'm just trying to trace the elements
 to see what happens and ends up getting null for some elements that i
 need to work with.
 
 private function init():void {
 trace(step1); // return the object
 trace(step1_1); // return the object
 trace(step1_2); // return the object
 trace(step2); // return the object
 trace(step2_1); // return NULL
 trace(step2_2);  // return NULL
 trace(step3) // return the object
 trace(step3_1); // return NULL
 trace(step3_2); // return NULL
 }
 
 The problem is that i really need to work with the canvas on the
 initialization. I can write dynamically on the canvas (step2 and
 step3) but weirdly i can't get the objects inside them.
 
 Any guru to help me out with that?! 
 
 Raf





[flexcoders] Re: Emulating Flash MultiThreading; Approaches

2007-11-19 Thread Josh VanderBerg
I'd have to agree with Seth, though I would suggest using a timer, as
the setInterval function appears to be deprecated.

In the past I've actually written a light weight class that
encapsulated the timer logic and handled storing state between
function calls.

--
Josh Vanderberg
vanderblog.typepad.com - Flex blog and open source flex components

--- In flexcoders@yahoogroups.com, Aldo Bucchi [EMAIL PROTECTED] wrote:

 Hi Guys,
 
 I need to run an expensive computation in the background ( 2 seconds
 on a modern day laptop ) while keeping the UI responsive. For this
 matter I have tried creating a secondary application and communicate
 with it in a non-blocking way. I share my thoughts so far to see if
 anyone can help with this one.
 
 First, some approaches to create a secondary application:
 * Load a module at runtime
 * Publish a module from within a new Frame ( Gonzalez/Harui trick )
 * Open another SWF altogether ( seems the safest best bet to me )
 
 Some approaches to communicate between apps:
 * LocalConnection ( sync )
 * Write/Poll a LSO ( async )
 
 And to go from blocking to non-blocking communication ( maybe )
  * Upon receiving a call start a timer and listen for the completion
 event. This should make the call return while leaving it up to events
 to start the real processing.
 
 Now, I haven't tried every combination yet, but so far I found some
 interesting results:
 
 I created two separate applications that talk through a
 LocalConnection. They use the timer trick ( upon receiving a call they
 set up a very short internal timer that will eventually start internal
 execution of the code ). If I open both SWFs in IE they effectively
 work as expected. I can start a very heavy computation on the
 secondary app while the first remains totally responsive to user
 events. Then I can make a reverse call and pass the results back. So
 far so good :)
 
 Firefox, however, is a show killer. No matter how I open the two apps
 ( tabs, apps, etc ) blocking occurs.
 
 Can someone from the flash player shed some light on this?
 This is not real multi-threading, it is simpler in the sense that I
 don't need synchronization. The contract is passing an input and
 waiting for a result.
 
 Now, even if I managed to pull this off with parallel applications...
 how would I materialize that setup in AIR?
 
 Thanks,
 Aldo
 
 
 
 -- 
  Aldo Bucchi 
 +1 858 539 6986
 +56 9 8429 8300
 +56 9 7623 8653
 skype:aldo.bucchi





[flexcoders] Re: flex + dll

2007-11-19 Thread Josh VanderBerg
You could also communicate with an .NET server, or even a J2EE server
that uses JNI to talk to a DLL.  It would be nice if AIR provided for
some sort of native interface...

--- In flexcoders@yahoogroups.com, Ralf Bokelberg
[EMAIL PROTECTED] wrote:

 Afaik you cannot use dll's with Flex. Since Flex is plattform
 independent,  this wouldn't make sense really.
 Maybe you can use the dll from IE/JavaScript though. You could use
 ExternalInterface from Flex to communicate to JavaScript
 Cheers
 Ralf.
 
 On Nov 19, 2007 9:29 PM, Bit [EMAIL PROTECTED] wrote:
 
 
 
 
 
 
  hi people, how do dll and flex!
   work with finger and flex!
   thx
 
   bit
 
   
 
 
 
 -- 
 Ralf Bokelberg [EMAIL PROTECTED]
 Flex  Flash Consultant based in Cologne/Germany
 Phone +49 (0) 221 530 15 35





[flexcoders] Re: Viewstack problems

2007-11-19 Thread Josh VanderBerg
It all depends - if you can get away with it, by all means, use the
default creation policy and defer object creation until later.  But, I
have to say that in any sort of a complex application this invariably
leads to problems that are difficult to work around.  Sometimes it's
just *simpler* to create everything up front and not have to worry
whether or not a particular component has yet to be instantiated.

As for your claim In a complex app, this will seriously degrade the
percieved responsiveness of your application., I have to disagree. 
At worst creationPolicy='all' will only adversely impact load time. 
After that the application will actually be more responsive than if
you defer the creation of child components.

--
Josh Vanderberg - vanderblog.typepad.com

--- In flexcoders@yahoogroups.com, Tracy Spratt [EMAIL PROTECTED] wrote:

 Since it hasn't been noted in this thread, using creationPolicy=all
 defeats a very important feature for many Flex components by forcing the
 entire application to be rendered before the user can interact with it.
 In a complex app, this will seriously degrade the percieved
 responsiveness of your application.  It might not seem like much at
 first, but as the app grows it will.  It is an easy fix, but is habit
 forming, and will hurt you eventually.
 
  
 
 Tracy
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of Ben Marchbanks
 Sent: Monday, November 19, 2007 12:56 PM
 To: flexcoders@yahoogroups.com
 Subject: Re: [flexcoders] Re: Viewstack problems
 
  
 
 I found that using a bound Model component is a great solution to
 populating and 
 updating data displayed on viewstack children.
 
 You can update the Model and when the viewstack child is visible the
 modified 
 data will be present.
 
 for example:
 
 Create a Model
 
 mx:Model id=myModel
 record
 FirstNameHomer/FirstName
 /record
 /mx:Model
 
 Add a text input to a viewstack child canvas
 
 mx:TextInput text={myModel.FirstName} /
 
 Then modify model using AS
 
 myModel.FirstName = Bart
 
 You can also bind your Model to an ArrayCollection, XML, or
 XMLListCollection 
 data source to populate it initially.
 
 mx:Model id=myModel
 record
 FirstName{myDataSource.FirstName}/FirstName
 /record
 /mx:Model
 
 Ben Marchbanks
 
 ::: alQemy ::: transforming information into intelligence
 http://www.alQemy.com http://www.alQemy.com 
 
 ::: magazooms ::: digital magazines
 http://www.magazooms.com http://www.magazooms.com 
 
 Greenville, SC
 864.284.9918
 
 johantrax wrote:
  
  
  First lets explain the problem:
  A viewstack normally doesn't create all it's children, but only the
  visible ones. This has been done in an ateempt to minimize the
  startuptime of your application.
  
  Possible solution:
  1. Ask yourself if you really need to write data on something that is
  not visible. It's not like someone is going to notice it...
  Try if you could use the initialize/show-events of the child itself to
  do this.
  2. If you can't delegate the writing, and you do have to write to an
  invisible component. Do as Josh suggested and set the creationPlicy of
  the viewstack and its children to all. This should let the viewstack
  create it's children, even if they're not visible.
  
  --jeetee
  
  --- In flexcoders@yahoogroups.com
 mailto:flexcoders%40yahoogroups.com
 mailto:flexcoders%40yahoogroups.com, 
  Rafael Faria
  rafaelfaria.grupos@ wrote:
  
   Hello all,
  
   I'm having a big trouble with a viewstack.
  
   I have this code
  
   mx:ViewStack id=vstack width=800 height=400
  
   mx:Canvas id=step1 label=donor information
   mx:HBox
   mx:Canvas id=step1_1 width=390 /
   mx:Canvas id=step1_2 width=375 /
   /mx:HBox
   /mx:Canvas
  
   mx:Canvas id=step2 label=call status
   mx:HBox
   mx:Canvas id=step2_1 width=390 /
   mx:Canvas id=step2_2 width=375 /
   /mx:HBox
   /mx:Canvas
  
   mx:Canvas id=step3 label=contribution information
   mx:HBox
   mx:Canvas id=step3_1 width=390 /
   mx:Canvas id=step3_2 width=375 /
   /mx:HBox
   /mx:Canvas
  
   /mx:ViewStack
  
   and an init actionscript which i'm just trying to trace the elements
   to see what happens and ends up getting null for some elements that
 i
   need to work with.
  
   private function init():void {
   trace(step1); // return the object
   trace(step1_1); // return the object
   trace(step1_2); // return the object
   trace(step2); // return the object
   trace(step2_1); // return NULL
   trace(step2_2); // return NULL
   trace(step3) // return the object
   trace(step3_1); // return NULL
   trace(step3_2); // return NULL
   }
  
   The problem is that i really need to work with the canvas on the
   initialization. I can write dynamically on the canvas (step2 and
   step3) but weirdly i can't get the objects inside them.
  
   Any guru to help me out with that?!
  
   Raf
  
  
  
 
 -- 
 Ben Marchbanks
 
 ::: alQemy ::: transforming information into intelligence
 http://www.alQemy.com

[flexcoders] Re: Rendering problem

2007-11-19 Thread Josh VanderBerg
You don't provide a lot of information, but I can say the only
problems I've ever experienced when moving a Flex app from a Windows
server to a Unix server were relate to the case sensitivity of the
file system.  For example in windows you will be able to get away with:

   [Embed(source=assets/LOGO.png)]

When the actual file name is logo.png, but in Unix the file name and
the Embed tag must have the exact same case.

__
Josh Vanderberg -- vanderblog.typepad.com

--- In flexcoders@yahoogroups.com, karunyanamuduri [EMAIL PROTECTED]
wrote:

 Hi All,
 
 I am a newbie in Flex. I am trying to do a simple Flex page deployment
 on our servers. It worked just fine when I deployed on a windows
 server. But I am getting error when I deployed on Sun - Unix ( Sun One
 Webserver) in the html wrapper saying that object not found.
 
 
 Any help is highly appreciated.
 
 
 Thanks,
 Karunya





[flexcoders] Re: Emulating Flash MultiThreading; Approaches

2007-11-19 Thread Josh VanderBerg
Sounds like what you have is more sophisticated that what I developed,
as it supports recursion.

I am curious though, why won't it do the trick?  You should be able
to preserve state perfectly between function calls, and even create a
call stack to support recursion, so it should be possible to perfectly
emulate a real function call.



--- In flexcoders@yahoogroups.com, Aldo Bucchi [EMAIL PROTECTED] wrote:

 Seth, Josh,
 
 The reason I have not used timers is because I can´t. The algorithms I
 am executing are not decomposable into discrete steps without titanic
 efforts. Evaluation of bitmap indexes in memory for intense relational
 algebra stuff.
 
 I do have a class that encapsulates a pseudo-thread and allows me to
 process chunks... it goes a long way to support a hierarchical stack
 for recursion, facilities to manage context between calls, timers, and
 a even a way to plug into the suspend background processing stuff in
 the framework so it yields nicely to effects.
 
 But, it won´t do the trick this time.
 
 So, back to the multithreading... Is it totally impossible?
 
 Thanks,
 Aldo
 
 On Nov 19, 2007 8:43 PM, Josh VanderBerg [EMAIL PROTECTED] wrote:
 
 
 
 
 
 
  I'd have to agree with Seth, though I would suggest using a timer, as
   the setInterval function appears to be deprecated.
 
   In the past I've actually written a light weight class that
   encapsulated the timer logic and handled storing state between
   function calls.
 
   --
   Josh Vanderberg
   vanderblog.typepad.com - Flex blog and open source flex components
 
 
 
   --- In flexcoders@yahoogroups.com, Aldo Bucchi aldo.bucchi@
wrote:
   
Hi Guys,
   
I need to run an expensive computation in the background ( 2
seconds
on a modern day laptop ) while keeping the UI responsive. For this
matter I have tried creating a secondary application and
communicate
with it in a non-blocking way. I share my thoughts so far to see if
anyone can help with this one.
   
First, some approaches to create a secondary application:
* Load a module at runtime
* Publish a module from within a new Frame ( Gonzalez/Harui trick )
* Open another SWF altogether ( seems the safest best bet to me )
   
Some approaches to communicate between apps:
* LocalConnection ( sync )
* Write/Poll a LSO ( async )
   
And to go from blocking to non-blocking communication ( maybe )
* Upon receiving a call start a timer and listen for the completion
event. This should make the call return while leaving it up to
events
to start the real processing.
   
Now, I haven't tried every combination yet, but so far I found some
interesting results:
   
I created two separate applications that talk through a
LocalConnection. They use the timer trick ( upon receiving a
call they
set up a very short internal timer that will eventually start
internal
execution of the code ). If I open both SWFs in IE they effectively
work as expected. I can start a very heavy computation on the
secondary app while the first remains totally responsive to user
events. Then I can make a reverse call and pass the results
back. So
far so good :)
   
Firefox, however, is a show killer. No matter how I open the
two apps
( tabs, apps, etc ) blocking occurs.
   
Can someone from the flash player shed some light on this?
This is not real multi-threading, it is simpler in the sense that I
don't need synchronization. The contract is passing an input and
waiting for a result.
   
Now, even if I managed to pull this off with parallel
applications...
how would I materialize that setup in AIR?
   
Thanks,
Aldo
   
   
   
--
 Aldo Bucchi 
+1 858 539 6986
+56 9 8429 8300
+56 9 7623 8653
skype:aldo.bucchi
   
 
 
   
 
 
 
 -- 
  Aldo Bucchi 
 +1 858 539 6986
 +56 9 8429 8300
 +56 9 7623 8653
 skype:aldo.bucchi





[flexcoders] Re: LCDS, AIR and Client Side Cacheing

2007-11-16 Thread Josh VanderBerg
That would certainly be a nice feature, but when I saw demos of using
the client side database in AIR at the Chicago Adobe Max, it didn't
look like there was much in the way of integration with LCDS.   

Unless something has changed, to do this you'd have to create client
side tables on your own, that mirror your server-side tables, and
manage the data stored there manually using a JDBC like API.  No small
feat.

__
Josh Vanderberg
vanderblog.typepad.com - Flex blog and open source flex components 

__



--- In flexcoders@yahoogroups.com, christophers1228
[EMAIL PROTECTED] wrote:

 Hello,
 
 Is it possible to enable client side caching with AIR and LCDS when
 you have managed destinations?
 
 For example, if I have 4 related tables each having their own
destination.
 
 SalesPerson has many WorkOrders.
 WorkOrder has one SalesPerson.
 WorkOrder has many Proposals.
 Proposal has one WorkOrder.
 Proposal has many LineItems.
 LineItem has one Proposal.
 
 If I have the following mxml code.
 
 mx:DataService id=workOrderDS cacheId=workOrders
 destination=hibernate-work-order/
 
 workOrderDS.fill(model.workOrders,
 'WorkOrderVO.getWorkOrdersForSalesPerson', {user: model.user.id});
 
 Thanks for any pointers.





[flexcoders] Re: Changing default components texts

2007-11-16 Thread Josh VanderBerg
You would extend the DateField component and override the properties
in the new Class' constructor, for example:

package mycomponents
{
import mx.controls.DateField;

public class MyDateField extends DateField
{
public function MyDateField()
{

super();
monthNames=['Jan', 'Feb', 'Mar', 'Apr', 'May',
'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov',
'Dec']; 
}

}
}


Then in your code replace all references to DateField with MyDateField.

--
Josh Vanderberg
vanderberg.typepad.com - Flex blog and open source flex components


--- In flexcoders@yahoogroups.com, cristian.mrsystem
[EMAIL PROTECTED] wrote:

 Hi.
 
 I'm using Flex 2.01, and I'm looking for something to change the
values for all the 
 components of the same kind, by declaring it only once in the
application. For example:
 I want to use my personal monthNames and dayNames for the component
DateField, but I 
 want to declare my values only once, and not every time I add a
DateField component.
 
 I got the idea when I saw that I could define the labels for the OK,
Cancel, Yes and No buttons 
 from Alert messages, by changing the value of variables in the main
application like:
   Alert.yesLabel = Sí;
   Alert.noLabel = No;
   Alert.cancelLabel = Cancelar;
   Alert.okLabel = Aceptar;
 
 Can I do something similar with other components? Where can I find
the info about it?
 
 Thank you very much





[flexcoders] Re: how do I freeze the users actions while data is loading

2007-11-16 Thread Josh VanderBerg
I tend to avoid modal dialogs if at all possible.  Generally it's much
better to display some sort of a non-modal status message, such as a
progress meter, and disable those functions that the user shouldn't
have access to while the data is loading.

For example, a current application I am working on allows users to
open documents that contain multiple pages of multiple reports/charts.
 Each report involves a round trip data request to the server that can
take up to a minute.  The simple solution would be to create a modal
popup that stays up until all of the reports for a page have loaded.  

Instead I display a progress meter in each report, until the report
data has returned, then I display a chart containing the data.  I
allow the user to switch between pages, and even between documents
while reports are loading.  It was a pain to code, but it makes for a
much more usable application.

Your case might be simpler, and there might be nothing meaningful the
user can do while waiting for the data, but the application will still
look and feel more responsive if you find a way to avoid the modal
dialog.  And who knows, you might eventually find something they can
do while they wait...


--
Josh Vanderberg
vanderblog.typepad.com - Flex Blog and open source components

--- In flexcoders@yahoogroups.com, Mark [EMAIL PROTECTED] wrote:

 I guess sometimes the easy answer is the one we overlook.  I don't 
 know why I didn't think about using some kind of wait message or 
 progress bar in a pop-up.  Thanks.
 
 I have one last question about this.  When do I destroy the pop-up?  
 I'd like it to stay on until all the data has been parsed, sorted 
 then loaded into the dataGrid.  I thought it would be on the 
 dataGrid in UpdateComplete, but that fires off everytime the DG 
 updates (doesn't it?).  So when is the best time to do this?
 
 Thanks Again
 
 
 
 --- In flexcoders@yahoogroups.com, Tom Chiverton tom.chiverton@ 
 wrote:
 
  On Thursday 15 Nov 2007, Mark wrote:
   to blur the screen out during this time like when using a pop- 
 up window?
  
  Why not pop up a model please wait box ?
  
  -- 
  Tom Chiverton
  Helping to widespreadedly orchestrate unique supply-chains
  on: http://thefalken.livejournal.com
  
  
  
  This email is sent for and on behalf of Halliwells LLP.
  
  Halliwells LLP is a limited liability partnership registered in 
 England and Wales under registered number OC307980 whose registered 
 office address is at St James's Court Brown Street Manchester M2 
 2JF.  A list of members is available for inspection at the 
 registered office.  Any reference to a partner in relation to 
 Halliwells LLP means a member of Halliwells LLP.  Regulated by The 
 Solicitors Regulation Authority.
  
  CONFIDENTIALITY
  
  This email is intended only for the use of the addressee named 
 above and may be confidential or legally privileged.  If you are not 
 the addressee you must not read it and must not use any information 
 contained in nor copy it nor inform any person other than Halliwells 
 LLP or the addressee of its existence or contents.  If you have 
 received this email in error please delete it and notify Halliwells 
 LLP IT Department on 0870 365 2500.
  
  For more information about Halliwells LLP visit www.halliwells.com.