[flexcoders] Trying to build slideshow functionality with wipe effects.

2009-08-03 Thread Todd
Hello All,
  I've built a slideshow feature in our application.  One of the requirements 
was that the images transition to the next with a nice wipe/slide effect.

I built up two solutions, both with drawbacks:
1) Used a view stack, added a repeater that added a VBox and Image for each 
photo to display.  I was able to get the appropriate slide/scrolling effect to 
work by attaching show and hide effects on a VBox that contained the image.  
This worked really well when there was 10 imgeas. However, when I loaded 200 
images...ouch memory management nightmare up to 1 gig of memory being used 
before crashing.

Next solution, I tried something simpler:
2)  Used a HorizontalList component and built some code to scroll through all 
the images.  This worked much better from a memory management perspective, 
however, I've LOST the ability to have the transitions of sliding from one 
image to the next.

My questions: 1) Has anyone seen any code that uses the List (HorizontalList) 
components for sliding/moving images into the main view area?  How do you get 
the effects to work with moving the itemRenderers around (this doesn't seem 
possible?)

2)  Anyone tried writing a component where there's a main view area, and an 
area to the left and right where you buffer images off screen for the sake of 
wiping/sliding them in?  Then when you move to the next image, the main image 
slides left, the left (off-screen image container) is then moved to the right, 
and he the right image slides into the middle.  This is a sort of recycling of 
components.  Seems like a lot of work and would be prone to bugs.

I'm open for any other ideas on making a slideshow with these sliding/scrolling 
transitions.

Thanks for any suggestions.




[flexcoders] Re: Trying to build slideshow functionality with wipe effects.

2009-08-03 Thread Todd
Yes, I've seen that.  Not useful to me.  There's not wiple/slide in transition. 
 All that sample is doing is loading a selected image from the list into the 
main viewing component, and adding a little Fade effect to it.

I need something that will actually bring the Image in from the right or left, 
which will involve being able to actually MOVE components somehow.  

--- In flexcoders@yahoogroups.com, Jason B nos...@... wrote:

 Have you seen this example slideshow by Adobe?
 
 http://examples.adobe.com/flex2/inproduct/sdk/photoviewer/PhotoViewer.html
 
 
 
 --- In flexcoders@yahoogroups.com, Todd tprekaski@ wrote:
 
  Hello All,
I've built a slideshow feature in our application.  One of the 
  requirements was that the images transition to the next with a nice 
  wipe/slide effect.
  
  I built up two solutions, both with drawbacks:
  1) Used a view stack, added a repeater that added a VBox and Image for each 
  photo to display.  I was able to get the appropriate slide/scrolling effect 
  to work by attaching show and hide effects on a VBox that contained the 
  image.  This worked really well when there was 10 imgeas. However, when I 
  loaded 200 images...ouch memory management nightmare up to 1 gig of memory 
  being used before crashing.
  
  Next solution, I tried something simpler:
  2)  Used a HorizontalList component and built some code to scroll through 
  all the images.  This worked much better from a memory management 
  perspective, however, I've LOST the ability to have the transitions of 
  sliding from one image to the next.
  
  My questions: 1) Has anyone seen any code that uses the List 
  (HorizontalList) components for sliding/moving images into the main view 
  area?  How do you get the effects to work with moving the itemRenderers 
  around (this doesn't seem possible?)
  
  2)  Anyone tried writing a component where there's a main view area, and an 
  area to the left and right where you buffer images off screen for the sake 
  of wiping/sliding them in?  Then when you move to the next image, the main 
  image slides left, the left (off-screen image container) is then moved to 
  the right, and he the right image slides into the middle.  This is a sort 
  of recycling of components.  Seems like a lot of work and would be prone to 
  bugs.
  
  I'm open for any other ideas on making a slideshow with these 
  sliding/scrolling transitions.
  
  Thanks for any suggestions.
 





[flexcoders] How to displaying symbols embedded in SWC files in Flex button icon styles?

2009-07-29 Thread Todd
Hello,
  I'm trying to do something that I think should be pretty basic.
  I have a mx:Button that at runtime, I want to set the icon property to 
artwork that I have embedded in a SWC file.  

  Now, I know about using the Embed tag declaring a new object of type Class, 
like 
   [Embed(source=logo.gif)]
   [Bindable] public var imgCls:Class;

However, I have artwork already declared in an imported SWC.  I know the Embed 
tag doesn't work for SWCs. 

I use this artwork just fine in setting mx:Image.source for display all over 
the application.

However, when I set the mx:Button.setTyle(icon, my_icon), I get an error:
TypeError: Error #1034: Type Coercion failed: cannot convert 
my_i...@315b02e1 to mx.core.IFlexDisplayObject.


Heck, I even tried simple reflection using the following to create a Class that 
resulted in the same error.:
var iconClass:Class = getDefinitionByName(my_icon) as Class;
btn.styleDeclaration.setStyle(icon, iconClass);  

I've tried casting, creating classes, etc...but nothing works.  I don't really 
want to create another version of the artwork.

Any ideas on how to set the icon property of a Button at runtime with a symbol 
declared in a SWC?





[flexcoders] Re: Flex Compilation takes long time

2009-07-29 Thread Todd
Unfortunately, you can do all those things noted above, you can restructure 
your modules, etc...but you'll probably still have longer compile times than 
you like. 

I've learned to live with it, and just treat our Flex projects like C++ 
projects in 1995.

Even optimized, on fast machines, we're looking at a minimum of 1 minute, 8 
seconds per compile for a single module.  And then 90 seconds for a single 
application.  

It really sucks when you're trying to do fast recompile because you're tweaking 
a UI item.


--- In flexcoders@yahoogroups.com, ondemand_mayur ondemand_ma...@... wrote:

 Hi folks,
 
 I have a project crated with Flex 3 ( SDK 3.2 ).
 When ever I compile it really takes much long time min 4 to 5 mins ( i.e. 240 
 to 300 seconds).
 
 That really make my developers crazy and it is so frustrating.
 
 Has any one any suggestions how to make compilation process faster.
 
  *   I have already set   -incremental=true   for flex compiler in Flex 
 Builder 3.
  *   I have around six diff. modules in my project. ( And I have noticed 
 after modularization of my application it takes some more time for 
 compilation I know that in the process - flex builder has to call another 
 tool for module compilation other then MXMLC )
 
 
 I Need some tech. Tips and suggestions to reduce the time for compilation.
 
 
 Thanking you in advance.
 
 Mayur





Re: [flexcoders] Who can explain me this:

2009-07-28 Thread Todd Kerpelman
Here's my guess as to what's going on underneath the hood...

private var a:Object = {data:String};
Let's create an object that lives at memory address 123 RAM Lane. This
variable 'a' gives me the object that lives at that address.

private var b:Object = {data:String};
Let's create an object that lives at memory address 456 Silicon Drive. This
variable 'b' gives me the object that lives at that address.

private var testx:Array = [a]
The first entry of this array is this object that the variable 'a' is
pointing to. Looks like that's the object at 123 RAM lane. So the first
entry of this array is 'The object that lives at 123 RAM Lane'

trace(testx[0].data) // 1st - 100
According to the first entry of my array, I want to be looking at the
object that lives at 123 RAM Lane. That's an object with a 'data' variable
of 100

a.data = 1000
This variable 'a' is looking at an object that lives at 123 RAM Lane. Let's
take this object and set it's 'data' variable to 1000

a = b;
You know this variable 'a' that's looking at the object that lives at 123
RAM Lane? Let's have it look at the object that lives at 456 Silicon Drive

trace(testx[0].data) // 3rd - 1000
According to the first entry of my array, I want to be looking at the
object that lives at 123 RAM lane. That's an object with a 'data' variable
of 1000

Basically, it's the fact that when you assign objects to variables, you're
not assigning the entire object, but a pointer to where that object lives in
memory. And then, when you stored that object in an array, I'm guessing that
Flex stored The address of the object that 'a' is pointing to instead of
anything related to the actual variable called 'a'. That's why you can
change what a is pointing to without actually changing what the first
element in your array is pointing to.

At least, I'm pretty sure that's what's going on. Somebody out there feel
free to correct me if I'm wrong...

--Todd





On Mon, Jul 27, 2009 at 6:17 PM, lytvynyuk lytvyn...@yahoo.com wrote:



 ?xml version=1.0 encoding=utf-8?
 mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
 layout=absolute creationComplete=init()
 mx:Script
 ![CDATA[
 import mx.collections.ArrayCollection;

 private var a:Object = {data:String};
 private var b:Object = {data:String};

 [Bindable] private var testx:Array = [a]

 private function init():void {
 b.data = 200;
 a.data = 100
 trace(testx[0].data) // 1st - 100
 a.data = 1000
 trace(testx[0].data) // 2nd - 1000
 a = b;
 trace(testx[0].data) // 3rd - 1000
 }
 ]]
 /mx:Script
 /mx:Application

 Why third trace(...) outputs 1000 not 200!? :)

  



[flexcoders] Trying Smooth slide transitions with List control item renders or a Repeater...

2009-06-17 Thread Todd
Hello All,
  I have a HorizontalList that has an ItemRenderer that displays an Image.  The 
HorizontalList only displays one of my images at a time.  I'm trying to make a 
transition where the next image slides into the screen.  
  Now, since itemRenderers are recycled, I probably can't use a List control.  
So, I'm open to using a Repeater.
  
  I've worked with transitions in the ViewStack before.  

  Any suggestions or links to slideshow samples that have images slide into 
place?

Thanks



[flexcoders] Re: Trying Smooth slide transitions with List control item renders or a Repeater...

2009-06-17 Thread Todd
You know, I think I'll just use a ViewStack with a child Repeater and call it 
good.  

(Still post some links if you've got them though.)

--- In flexcoders@yahoogroups.com, Todd tpreka...@... wrote:

 Hello All,
   I have a HorizontalList that has an ItemRenderer that displays an Image.  
 The HorizontalList only displays one of my images at a time.  I'm trying to 
 make a transition where the next image slides into the screen.  
   Now, since itemRenderers are recycled, I probably can't use a List control. 
  So, I'm open to using a Repeater.
   
   I've worked with transitions in the ViewStack before.  
 
   Any suggestions or links to slideshow samples that have images slide into 
 place?
 
 Thanks





[flexcoders] Seekbar for Flex-based video player

2009-05-21 Thread Todd
Hello,
  I'm working on a video player and I'm curious to whether there's a seek bar 
component for Flex.  Something that supports: the timeline progress bar that 
shows the current postion of the file playing; allows the user to drag/seek to 
a new point in time; AND shows faintly the overall progress of the file 
loading?  All really common functionality in media players these days.

  Thought I'd ask if there's some good samples out there already -- Google 
search didn't help much.

  Thought I'd ask before I start experimenting with a Progress Bar and HSlider, 
which seems the way to get this functionality to work.



[flexcoders] Looking for syntatic sugar for getting an Class reference based on String

2009-05-11 Thread Todd
I have a long list string to graphic class mappings that are contained within a 
gigantic switch statement:

case icon_1:
  selectedIcon = icon_1;
  break;
case icon_2:
  selectedIcon = icon_2;
  break;

I'm looking for a way to get an instance of an Class reference based on a 
string.  I'm not looking to create a NEW instance, however.

For example, I'm NOT looking to do this:
var icon_1:Class = getDefinitionByName(icon_1) as Class;
selectedIcon = new icon_1();

I've tried some simple things like, but without results:
selectedIcon = Class(icon_1);

Any suggestions for the syntactical shortcut that I'm looking for? 

Thanks



[flexcoders] Re: Looking for syntatic sugar for getting an Class reference based on String

2009-05-11 Thread Todd
I don't know what I was smoking, but my solution actually works as I'd expect.

The following works (I was just off a bit in my syntax):
var icon1:Class = getDefinitionByName(icon1) as Class;
var currentIcon:Object =  icon1 as Object;  

--- In flexcoders@yahoogroups.com, Todd tpreka...@... wrote:

 I have a long list string to graphic class mappings that are contained within 
 a gigantic switch statement:
 
 case icon_1:
   selectedIcon = icon_1;
   break;
 case icon_2:
   selectedIcon = icon_2;
   break;
 
 I'm looking for a way to get an instance of an Class reference based on a 
 string.  I'm not looking to create a NEW instance, however.
 
 For example, I'm NOT looking to do this:
 var icon_1:Class = getDefinitionByName(icon_1) as Class;
 selectedIcon = new icon_1();
 
 I've tried some simple things like, but without results:
 selectedIcon = Class(icon_1);
 
 Any suggestions for the syntactical shortcut that I'm looking for? 
 
 Thanks





[flexcoders] Resource bundles and Modules

2009-04-30 Thread Todd
Hello All,
  I have some Modules (Cairngorm-based if that matters), that I want to have 
their own resource.property files that are compiled into the module.
  I can't seem to get it working. 
  Should I be looking down the path of manually adding my resource strings to 
the ResourceManger when my Module loads?  Or, is there something more built-in 
to Flex that I'm missing.  (When I try searching on this topic, I'm mostly only 
finding how to bundle your resources in seperate module.swfs...which isn't what 
I'm looking for.  I just want to have the the Module's resources compiled 
within it.)

Thanks,
Todd




[flexcoders] Re: Resource bundles and Modules

2009-04-30 Thread Todd
Mine was actually pretty simple to solve.  I had apparently just forget to use 
the [ResourceBundle] attribute so that the compiler would know to bring in the 
appropriate resource files.

--- In flexcoders@yahoogroups.com, guy.tomer guy.to...@... wrote:

 --- In flexcoders@yahoogroups.com, Todd tprekaski@ wrote:
 
  Hello All,
I have some Modules (Cairngorm-based if that matters), that I want to 
  have their own resource.property files that are compiled into the module.
I can't seem to get it working. 
Should I be looking down the path of manually adding my resource strings 
  to the ResourceManger when my Module loads?  Or, is there something more 
  built-in to Flex that I'm missing.  (When I try searching on this topic, 
  I'm mostly only finding how to bundle your resources in seperate 
  module.swfs...which isn't what I'm looking for.  I just want to have the 
  the Module's resources compiled within it.)
  
  Thanks,
  Todd
 
 
 Basically you need to compile the properties file into your swf, 
 you can do it by adding to the compiler arguments in flex builder.
 The arguments I found relevant are -locale=en_US 
 -allow-source-path-overlap=true -source-path=locale/en_US 
 (the source path is the path under src you have to create these folders).
 
 Having said all that this is working inconsistently for me, 
 you can see my question from a bit earlier today... 
 I'll be happy to hear how this works for you.





[flexcoders] Trying to compile app with 3.2 Flex SDK, but it includes the 3.1 Flex librares.

2009-03-10 Thread Todd
Hello All,

Recently, we've started the process of trying to upgrade the SDK in which we 
compile our project from a patched version of the 3.0 branch (there were 
nightly bug fixes with Web SErvices that we needed) to the latest and greatest 
3.2.

In Flex Builder 3.02, I've set in the Properties editor to use the Flex 3.2 
SDK.  However, when I compile and build, the framework_3.1.0.2710.swf is thrown 
in the bin-debug directory.

How can I tell which real version of the SDK my project was compiled with to 
ensure RSL compatability?  Also, any insight as to why FB is using the 3.1 SWF 
and SWZ files would be helpful.

Thanks,



[flexcoders] DataGrid ItemRenderers and display text highlighted search text.

2009-03-05 Thread Todd
Hello All (probably one for Alex H),
 I know I've seen this implemented before somewhere around the web, but I've 
search for awhile and can't find it.

I have a custom DataGrid that I've subclassed and do lots of trick 
functionality on it.  I pass it a search string, and only the rows that contain 
that search string are displayed.

Now, what I'd like to do is to customize the ItemRenderers so that the portion 
of text in any ItemRenderer that matches the search string is displayed in a 
different color and underlined.  

I know I've seen a demo of this somewhere?  Any ideas?  Or, any ideas how to 
implement?

My idea is to make a custom DataGridItemRenderer and set it at the DataGrid 
level so each of the columns will use it.  And then on the data property, loop 
through each of the items being displayed and then format accordingly.  
However, this seems inefficient, especially since I've already implemented some 
filterFunctions on the dataProvider...

Thanks for any suggestions.



[flexcoders] Can I debug my Flex applications on 64 bit windows?

2009-02-10 Thread Todd
Hello All,
  I'm trying to get my Flex Builder to debug, but I keep getting a
variety of errors:

  I've installed both debug versions of flashplayer_10_plugin_debug,
and flashplayer_10_ActiveX:

I keep getting the following error:
C:\Windows\SysWOW64\Macromed\Flash\Flash10a.ocx

Flex Builder cannot locate the required debugger version of Flash
Player. You might need to install the debugger version of Flash Player
9 or reinstall Flex Builder.

Do you want to try to debug with the current version?




[flexcoders] Re: Can I debug my Flex applications on 64 bit windows?

2009-02-10 Thread Todd
No, I didn't change my target for FP 10.

However, I jsut figured it out.  I have to use Internet Explorer 32
bit version to run the Flash Player Debugger.

So to get this working in Eclipse:
1)  Go to Windows-Preferences-General-Web Browser
2)  Add a new External Web Browser
3)  Make it point at: C:\Program Files (x86)\Internet
Explorer\iexplore.exe

Notice that I'm using the (x86) version.

Thought I'd add the steps to get it working in case someone else
searches in t he future.


--- In flexcoders@yahoogroups.com, Ryan Graham ryan.gra...@... wrote:

 
 Did you change your compiler options to target FP10?
 
  
 
 HTH,
 
 Ryan
 
  
 
 From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
 Behalf Of Todd
 Sent: Tuesday, February 10, 2009 10:27 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Can I debug my Flex applications on 64 bit
 windows?
 
  
 
 Hello All,
 I'm trying to get my Flex Builder to debug, but I keep getting a
 variety of errors:
 
 I've installed both debug versions of flashplayer_10_plugin_debug,
 and flashplayer_10_ActiveX:
 
 I keep getting the following error:
 C:\Windows\SysWOW64\Macromed\Flash\Flash10a.ocx
 
 Flex Builder cannot locate the required debugger version of Flash
 Player. You might need to install the debugger version of Flash Player
 9 or reinstall Flex Builder.
 
 Do you want to try to debug with the current version?
 
 
 
 
 
 This message is private and confidential. If you have received it in
error, please notify the sender and remove it from your system.





[flexcoders] Problems with Debug Version of ActiveX Flash Player in Internet Explorer 7

2009-02-03 Thread Todd
OK, out of the blue, my debug version of Flash Player 10 went belly up
when I'm trying to debug my Flex applications from Flex Builder 3.02.

I've manually done the following:
1) Uninstalled the ActiveX Flash Player using the uninstall file.
2) uninstalled with the /clean option
3) cleaned my registery
4) Used the Adobe Script reset_fp10.cmd with the Microsoft tool subinacl.
5) Done all the above with reboots in between.
6) Turned off all my SpyBot immunizations.
7) Tunred of Advanced SystemCare immunizations.
8) Tunred of my AVG anti-virus.
9) Cleaned the Flex Builder project
10) Restored the html-template files

And still, I'm left with:
Alternate HTML content should be placed here. This content requires
the Adobe Flash Player. Get Flash 

BTW, when I go to http://get.adobe.com/flashplayer/ after installing
the debug version of the ActiveX control, it says that I have it
installed.

Grrr...Anything else to try?  



[flexcoders] Re: Problems with Debug Version of ActiveX Flash Player in Internet Explorer 7

2009-02-03 Thread Todd
I finally stumbled upon this page:
http://therush.wordpress.com/2008/03/10/flex-builder-3-debugger-stopped-working/

While it didn't help me get Debugging working on IE, one of the many
comments people left in response to his suggestion eventually got it
working back on Firefox.  So, I'm good with that for now, or at least
I'm debugging again.





[flexcoders] Looking to tweak a List control's drop indicator

2009-01-27 Thread Todd
Hello All,
  I'm looking to change the behavior/looks of the drop indicator when
rearranging items in a List control.

  I understand that I can make a new dropIndicatorSkin (which I hope
to do this in Flash).

  However, I'd also like to add some separation between the items in
the list when I drag the item over a potential drop spot.  What would
happen is both the item above and below would shift apart a bit. 
Ideally, the individual items wouldn't change size, but if it made it
easier, they could squash a bit. 

Any suggestions on how to do something like this?  (I'm thinking there
might be an API inside Flex to already deal with this.)

Thanks.



[flexcoders] Re: Looking to tweak a List control's drop indicator

2009-01-27 Thread Todd
What I need is something that the dropIndicator, that can actually
take up space.  Right now, I can draw whatever I want on the
dropIndicator, but it bleeds over the Items.  I'd prefer it to have 10
pixels of padding on the top and bottom, so it pushes the Item
before and after away from the dropIndicator line with a nice animation.

I know I can make the dragImage whatever I want.  But that's just
going to be displaying what I'm dragging, not affecting the potential
drop zone.

Maybe I need to work with temporarily adding a dummy ListItem where
the drop zone is going to be?

--- In flexcoders@yahoogroups.com, Alex Harui aha...@... wrote:

 The dropIndicator is a simple line showing where the drop will go.
 
 The dragProxy shows a dragImage that is handed into DragManager that
shows an image of what is being dragged.  In theory, you can replace
the dragImage with a fancier one that changes somehow.
 
 From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com]
On Behalf Of Todd
 Sent: Tuesday, January 27, 2009 9:02 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Looking to tweak a List control's drop indicator
 
 
 Hello All,
 I'm looking to change the behavior/looks of the drop indicator when
 rearranging items in a List control.
 
 I understand that I can make a new dropIndicatorSkin (which I hope
 to do this in Flash).
 
 However, I'd also like to add some separation between the items in
 the list when I drag the item over a potential drop spot. What would
 happen is both the item above and below would shift apart a bit.
 Ideally, the individual items wouldn't change size, but if it made it
 easier, they could squash a bit.
 
 Any suggestions on how to do something like this? (I'm thinking there
 might be an API inside Flex to already deal with this.)
 
 Thanks.





[flexcoders] Re: Looking to tweak a List control's drop indicator

2009-01-27 Thread Todd
I like your last idea of adjusting the padding on top of the item
renderers.  OR maybe I could just affect the size of the item renderer
before and after, squishing them a little as to not cascade the
movement of controls across every item renderer.

I was hoping to also put some form of delay in it, as to not move
until the user's paused over it for a duration.

I'm going to have to think about the necessity of this functionality.
 I haven't seen anyone else do anything like this.  It's really a baby
step to getting to the functionality I really want of context
sensitive text messages in the drop zone.

Thanks, Alex, for some ideas...



--- In flexcoders@yahoogroups.com, Alex Harui aha...@... wrote:

 I see, I didn't understand that you want to alter the drop-zone. 
IIRC, altering renderer size/position on rollover has a difficulty
rating of 8 out of 10 if not higher.  The trick is to not have the
list change its renderer mapping, and doing that on rollover is hard
because the resizing affects what you've rolled over.  I'd probably
try to use some of the dataEffects code (which won't work on
DataGrid).  Honestly, I'm not sure it's been successfully done. 
Search the web to see if someone's found an easy way to do this.
 
 Also consider how such an effect will look when the drop area is
being scrubbed.  If renderers are constantly shifting open and close
it may not be pleasant to the eye and could also make targeting more
difficult.
 
 You could alter the paddingTop and paddingBottom for all renderers
on DRAG_ENTER and restore on DRAG_EXIT.  Not as snazzy for sure, but
I'd say that'd have a difficulty rating of 3 out 10.
 
 From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com]
On Behalf Of Todd
 Sent: Tuesday, January 27, 2009 7:36 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: Looking to tweak a List control's drop
indicator
 
 
 What I need is something that the dropIndicator, that can actually
 take up space. Right now, I can draw whatever I want on the
 dropIndicator, but it bleeds over the Items. I'd prefer it to have 10
 pixels of padding on the top and bottom, so it pushes the Item
 before and after away from the dropIndicator line with a nice animation.
 
 I know I can make the dragImage whatever I want. But that's just
 going to be displaying what I'm dragging, not affecting the potential
 drop zone.
 
 Maybe I need to work with temporarily adding a dummy ListItem where
 the drop zone is going to be?
 
 --- In
flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com, Alex
Harui aharui@ wrote:
 
  The dropIndicator is a simple line showing where the drop will go.
 
  The dragProxy shows a dragImage that is handed into DragManager that
 shows an image of what is being dragged. In theory, you can replace
 the dragImage with a fancier one that changes somehow.
 
  From:
flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com
[mailto:flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com]
 On Behalf Of Todd
  Sent: Tuesday, January 27, 2009 9:02 AM
  To: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com
  Subject: [flexcoders] Looking to tweak a List control's drop indicator
 
 
  Hello All,
  I'm looking to change the behavior/looks of the drop indicator when
  rearranging items in a List control.
 
  I understand that I can make a new dropIndicatorSkin (which I hope
  to do this in Flash).
 
  However, I'd also like to add some separation between the items in
  the list when I drag the item over a potential drop spot. What would
  happen is both the item above and below would shift apart a bit.
  Ideally, the individual items wouldn't change size, but if it made it
  easier, they could squash a bit.
 
  Any suggestions on how to do something like this? (I'm thinking there
  might be an API inside Flex to already deal with this.)
 
  Thanks.
 





[flexcoders] Working with nested Buttons

2009-01-06 Thread Todd
Hello,
  I have a custom Button control that uses extensive skinning (done in
Flash, and linked through the Button's skin-style) to change the skins
for mouse over, down,etc.  The custom Button can contain multiple
child objects, like other LinkButtons.
  I can't get the sub-button to trigger, though.  On the parent
button, I've fiddled with buttonMode and mouseChildren properties.
  So, I tried making the Parent a VBox (or any type of container)
instead of a Button.  Doing this enables me to now get the child
buttons to trigger properly.  However, I've lost the button skinning
for mouse Over, down, disabled, click, etc...  The skin is a
programatic skin that has implementations for downSkin,
selectedOverSkin, overSkin, selectedUpSkin, etc...

  What would be the preferred way to get the HBox (or any container)
to act like a button with custom button skinning, and at the same time
be able to have nested buttons that would take priority when the mouse
hovers over them?  I'd like to think I'm missing something trivial in
getting this to work because it seems like a pretty common use case.

Thanks for any suggestions.

  



[flexcoders] Re: Working with nested Buttons

2009-01-06 Thread Todd
I solved my problem.  On the nested-child button, all I had to do was
set buttonMode=true and useHandCursor=true.  It wasn't enough to
just have the LinkButton and assume that it would behave as a button.

All works perfectly now with my complex button skin.  

--- In flexcoders@yahoogroups.com, Todd tpreka...@... wrote:

 Hello,
   I have a custom Button control that uses extensive skinning (done in
 Flash, and linked through the Button's skin-style) to change the skins
 for mouse over, down,etc.  The custom Button can contain multiple
 child objects, like other LinkButtons.
   I can't get the sub-button to trigger, though.  On the parent
 button, I've fiddled with buttonMode and mouseChildren properties.
   So, I tried making the Parent a VBox (or any type of container)
 instead of a Button.  Doing this enables me to now get the child
 buttons to trigger properly.  However, I've lost the button skinning
 for mouse Over, down, disabled, click, etc...  The skin is a
 programatic skin that has implementations for downSkin,
 selectedOverSkin, overSkin, selectedUpSkin, etc...
 
   What would be the preferred way to get the HBox (or any container)
 to act like a button with custom button skinning, and at the same time
 be able to have nested buttons that would take priority when the mouse
 hovers over them?  I'd like to think I'm missing something trivial in
 getting this to work because it seems like a pretty common use case.
 
 Thanks for any suggestions.





[flexcoders] Button hotspot for skins that aren't rectangular borders

2008-12-18 Thread Todd
Hello All,
  I have a button with a skin that isn't a rectangular border.  What's
the best way to have the button only change states when the user
mouses over the perceived button bounds (with an irregular skin).

For example, I have a button and custom skin that looks like:

|-\
|  \
|   \
|   /
|  /
|-/

Notice the right-side, and how there's an angular triangle.  I'd like
the button to NOT change state when the mouse isn't intercepting with
what the user actually sees as a button.

BTW, I'm using a programmatic skin.  I tried just using button states
with different PNG images that have the background transparent outside
the perceived border, thinking that Flex would manage the hotspot
automatically for transparent pixels.

Any input would be appreciated.

Thanks.




[flexcoders] Re: Button hotspot for skins that aren't rectangular borders

2008-12-18 Thread Todd
Hmmm...the formatting previewed correctly, but was totally messed up
during the actual post, let me try again:

|-\  eol  
|  \ eol
|   \eol
|   /eol
|  / eol   
|-/  eol


--- In flexcoders@yahoogroups.com, Todd tpreka...@... wrote:

 Hello All,
   I have a button with a skin that isn't a rectangular border.  What's
 the best way to have the button only change states when the user
 mouses over the perceived button bounds (with an irregular skin).
 
 For example, I have a button and custom skin that looks like:
 
 |-\
 |  \
 |   \
 |   /
 |  /
 |-/
 
 Notice the right-side, and how there's an angular triangle.  I'd like
 the button to NOT change state when the mouse isn't intercepting with
 what the user actually sees as a button.
 
 BTW, I'm using a programmatic skin.  I tried just using button states
 with different PNG images that have the background transparent outside
 the perceived border, thinking that Flex would manage the hotspot
 automatically for transparent pixels.
 
 Any input would be appreciated.
 
 Thanks.





[flexcoders] Re: Button hotspot for skins that aren't rectangular borders

2008-12-18 Thread Todd
Ok, thanks.  That clarified some things for me, and now I've now
gotten it to work by fixing code that filled in the shape between the
lines only.

Thanks.

--- In flexcoders@yahoogroups.com, Alex Harui aha...@... wrote:

 If your programattic skin doesn't have any pixels in some area, the
mouse shouldn't detect it.  The mouse sees transparent pixels as valid
target area.
 
 From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com]
On Behalf Of Todd
 Sent: Thursday, December 18, 2008 8:48 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: Button hotspot for skins that aren't
rectangular borders
 
 
 Hmmm...the formatting previewed correctly, but was totally messed up
 during the actual post, let me try again:
 
 |-\ eol
 | \ eol
 | \ eol
 | / eol
 | / eol
 |-/ eol
 
 --- In
flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com,
Todd tprekaski@ wrote:
 
  Hello All,
  I have a button with a skin that isn't a rectangular border. What's
  the best way to have the button only change states when the user
  mouses over the perceived button bounds (with an irregular skin).
 
  For example, I have a button and custom skin that looks like:
 
  |-\
  | \
  | \
  | /
  | /
  |-/
 
  Notice the right-side, and how there's an angular triangle. I'd like
  the button to NOT change state when the mouse isn't intercepting with
  what the user actually sees as a button.
 
  BTW, I'm using a programmatic skin. I tried just using button states
  with different PNG images that have the background transparent outside
  the perceived border, thinking that Flex would manage the hotspot
  automatically for transparent pixels.
 
  Any input would be appreciated.
 
  Thanks.
 





[flexcoders] Re: handle large data sets from SOAP service

2008-12-05 Thread Todd
Sounds like what you're planning on doing is more dependent upon your
backend implementation for executing a SOAP request, retrieving the
million records, probably caching it somewhere on the server, maybe
even slurping it into a database.  Then, you'll have to create your
own service, either web, or http-based XML to communicate your managed
data to your specific client.  

None of this is five minutes of code, drop a sample, and be done,
especially since the serverside code could be written in a variety of
languages.

I'm actually impressed someone has released a web service that returns
a million records from a single call.  I swear I read somewhere that
with Soap 1.1, the message size was limited, which is why they came
out with some WS-* to handle it (but I'm probably wrong here.)

Also, if  your DataGrid is choking at 5000 records, there's probably
something else going on during the load of the data, as I've
personally loaded more than 100K records into one, quite easily.  


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

 Thanks for the respond.  That's what we plan to do here.
 Can you or someone show me a code sample of paging?
 Thanks,
 Michelle.
 
  
 
 
 
 
 From: Tracy Spratt [EMAIL PROTECTED]
 To: flexcoders@yahoogroups.com
 Sent: Thursday, December 4, 2008 10:18:50 AM
 Subject: RE: [flexcoders] Re: handle large data sets from SOAP service
 
 
 If you do not control the Web service itself, then you will probably
need to get the data server-side and implement your own paging.
 Tracy
  
 
 
 
 From:[EMAIL PROTECTED] ups.com [mailto: [EMAIL PROTECTED]
ups.com ] On Behalf Of Michelle Davis
 Sent: Thursday, December 04, 2008 10:53 AM
 To: [EMAIL PROTECTED] ups.com
 Subject: Re: [flexcoders] Re: handle large data sets from SOAP service
  
 Hi Steve,
 Thanks for reading my email.
  
 The problems I'm having are how to get million of records from web
service thru SOAP and display those records thru pagination.
    
 Currently I¢m using ArrayCollection to store the data after receive
from the server thru SOAP service and using DataGrid to display.  When
the data contains 5000+ records it chokes up.
  
 Thanks,
 Michelle.
   
  
  
 
  
  
 
 
 
 From:valdhor valdhorlists@ embarqmail. com
 To: [EMAIL PROTECTED] ups.com
 Sent: Thursday, December 4, 2008 6:28:34 AM
 Subject: [flexcoders] Re: handle large data sets from SOAP service
 I don't know about everybody else, but I could do with some more
details.
 
 Are you having problems getting the data, displaying it or something
else?
 
 What do you mean by handle?
 
 If you could expand on what you are trying to do we may be able to
 point you in the right direction.
 
 Steve
 
 --- In [EMAIL PROTECTED] ups.com, Michelle Davis mtndavis@ . wrote:
 
  Hi all,
  
  Can someone show me sample on how to handle large data sets from
 SOAP service?  I'm desperate 
  for helps.
   
  Thanks,
  Michelle.
 
  





[flexcoders] Re: Accessing properties of Embedded Flash SWFs from Flex 3

2008-11-12 Thread Todd
OK, I've found some old posts now that I've been pointed that
direction.   

I'm still struggling, though, in one of your old posts you mention
doing something along the following:

  [Embed(SimpleCS3.swf)]
  public var simpleCS3:Class;

and an instance of it called `foo':
  public var foo:DisplayObject;
  private function makeOne():void
  {
foo = new simpleCS3();
  }

The main class of that swf will end up in `bar' if you do this:
 
var bar:MovieClip =
Loader(DisplayObjectContainer(foo).getChildAt(0)).content;

SO, back to my application:

I'm using a SWFLoader with an id of loadedSWF, and the source set to
the Embeded Class.  on CreationComplete, I bind to the appropraite
Click events inside the SWF, and all works well.

Then inside the click event, I want to access properties on the
embedded SWF.

Now I try something similar to your sample I just found, but I get all
sorts of casting errors, I've tried:
var bar:MovieClip =  DisplayObjectContainer(loadedSWF.content).content
as MovieClip;
and 
var bar:MovieClip =
Loader(DisplayObjectContainer(loadedSWF.content)).content as MovieClip;
and  
var bar:MovieClip = DisplayObjectContainer(loadedSWF.content) as
MovieClip;

I assume that once I get the appriopriate MovieClitp, my call to the
property to get at the ARray will be as simple as movieClip.propertyname?

Thanks,
--Todd

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

 An embedded SWF is wrapped in a MovieClipLoader.  There should be
some old threads about how to dig into that to get to the actual SWF
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED]
On Behalf Of Todd
 Sent: Tuesday, November 11, 2008 11:37 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: Accessing properties of Embedded Flash
SWFs from Flex 3
 
 
 From my readings around the web, the Flex compiler strips all timeline
 information from the SWF when embedding. I now have found a suggested
 workaround over at Grant Skinner's Blog, however, it's dependent upon
 all the code written on the timeline being put into a Class (this is
 how I interpreted the workaround).
 
 I'm going to look into probably using the Flash Component Tooklkit for
 Flex and seeing if the dev can wrap up the Flash stuff into a
 component and seeing where to go from there.
 
 --- In
flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com,
Fotis Chatzinikos
 fotis.chatzinikos@ wrote:
 
  hm, it seems that when embeded the compiler does not have enough
 info to see
  if your variable is there or not (you mention that loading the swf
  dynamically works)...
 
  I remember reading somewhere in this forum that there is a
compiler flag
  that makes things less strict and your error would get away, but...
 never
  used it myself cannot remember the setting search the forum or
 google for it
 
  On Tue, Nov 11, 2008 at 8:10 PM, Todd tprekaski@ wrote:
 
   The symbol that I'm trying to get out of Flash is a global Array
   defenition, so I'm not sure it's working. I did try embedding the
   name of the public global array as a seperate embed.
  
   I'm not too interested in the Flex Component Kit for Flash, as this
   component is already written.
  
   My main goal is just accessesing the global flash variable from
within
   Flex.
  
   --- In
flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com
flexcoders%40yahoogroups.com,
 Amy
   amyblankenship@ wrote:
   
--- In
flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com
 flexcoders%40yahoogroups.com, Todd
   tprekaski@ wrote:

 OK, a little more research tells me that the Flex compiler
 strips out
 all timeline code from the embedded Flash timeline.

 So, now my question becomes: How do I expose a property from
FLASH
 that is accessible from Flex?
   
I know you've already gotten an answer about the Component Kit,
 but I
think if you're not doing anything complex, you can just embed the
symbol from the library. I believe that does respect the
 timeline code.
   
http://livedocs.adobe.com/flex/3/html/embed_4.html
   
  
  
  
 
 
 
  --
  Fotis Chatzinikos, Ph.D.
  Founder,
  Phinnovation
  Fotis.Chatzinikos@,
 





[flexcoders] Accessing properties of Embedded Flash SWFs from Flex 3

2008-11-11 Thread Todd
Hello All,
  The Flex docs aren't really clear on this, but I'm wondering if it's
possible to EMBED a SWF written for Flash 9 into a Flex 3 application,
and then access some properties on it, methods, and click events from
it.  Right now, I get an error:

ReferenceError: Error #1069: Property foo_test not found on
embedded_asset_object and there is no default value.

I'm using mx:SWFLoader with an id of loadedSWF and some code that
looks like:

 loadedSWFMainTimeline = loadedSWF.content; 
 testProperty = loadedSWFMainTimeline.testProperty;

Poof Error!

I've also tried casting the loadedSWF.content to Objects and the
dataClass (which wasn't right)
 loadedSWFMainTimeline = (loadedSWF.content as Object).dataClass;
 testProperty = loadedSWFMainTimeline.testProperty;

Any ideas?  The Flex documentation alludes that this won't work for
SWFs compiled to Flash Player 8 or earlier, but doesn't really
mention, nor have samples for FP 9+





[flexcoders] Re: Accessing properties of Embedded Flash SWFs from Flex 3

2008-11-11 Thread Todd
I should also say that all works well when the SWF is dynamically
loaded at runtime.  It's only when embedded into the application that
it fails.

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

 Hello All,
   The Flex docs aren't really clear on this, but I'm wondering if it's
 possible to EMBED a SWF written for Flash 9 into a Flex 3 application,
 and then access some properties on it, methods, and click events from
 it.  Right now, I get an error:
 
 ReferenceError: Error #1069: Property foo_test not found on
 embedded_asset_object and there is no default value.
 
 I'm using mx:SWFLoader with an id of loadedSWF and some code that
 looks like:
 
  loadedSWFMainTimeline = loadedSWF.content; 
  testProperty = loadedSWFMainTimeline.testProperty;
 
 Poof Error!
 
 I've also tried casting the loadedSWF.content to Objects and the
 dataClass (which wasn't right)
  loadedSWFMainTimeline = (loadedSWF.content as Object).dataClass;
  testProperty = loadedSWFMainTimeline.testProperty;
 
 Any ideas?  The Flex documentation alludes that this won't work for
 SWFs compiled to Flash Player 8 or earlier, but doesn't really
 mention, nor have samples for FP 9+





[flexcoders] Re: Accessing properties of Embedded Flash SWFs from Flex 3

2008-11-11 Thread Todd
OK, a little more research tells me that the Flex compiler strips out
all timeline code from the embedded Flash timeline.

So, now my question becomes:  How do I expose a property from FLASH
that is accessible from Flex? 

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

 Hello All,
   The Flex docs aren't really clear on this, but I'm wondering if it's
 possible to EMBED a SWF written for Flash 9 into a Flex 3 application,
 and then access some properties on it, methods, and click events from
 it.  Right now, I get an error:
 
 ReferenceError: Error #1069: Property foo_test not found on
 embedded_asset_object and there is no default value.
 
 I'm using mx:SWFLoader with an id of loadedSWF and some code that
 looks like:
 
  loadedSWFMainTimeline = loadedSWF.content; 
  testProperty = loadedSWFMainTimeline.testProperty;
 
 Poof Error!
 
 I've also tried casting the loadedSWF.content to Objects and the
 dataClass (which wasn't right)
  loadedSWFMainTimeline = (loadedSWF.content as Object).dataClass;
  testProperty = loadedSWFMainTimeline.testProperty;
 
 Any ideas?  The Flex documentation alludes that this won't work for
 SWFs compiled to Flash Player 8 or earlier, but doesn't really
 mention, nor have samples for FP 9+





[flexcoders] Re: Accessing properties of Embedded Flash SWFs from Flex 3

2008-11-11 Thread Todd
The symbol that I'm trying to get out of Flash is a global Array
defenition, so I'm not sure it's working.  I did try embedding the
name of the public global array as a seperate embed.

I'm not too interested in the Flex Component Kit for Flash, as this
component is already written.  

My main goal is just accessesing the global flash variable from within
Flex.  

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

 --- In flexcoders@yahoogroups.com, Todd tprekaski@ wrote:
 
  OK, a little more research tells me that the Flex compiler strips out
  all timeline code from the embedded Flash timeline.
  
  So, now my question becomes:  How do I expose a property from FLASH
  that is accessible from Flex? 
 
 I know you've already gotten an answer about the Component Kit, but I 
 think if you're not doing anything complex, you can just embed the 
 symbol from the library.  I believe that does respect the timeline code.
 
 http://livedocs.adobe.com/flex/3/html/embed_4.html





[flexcoders] Re: Accessing properties of Embedded Flash SWFs from Flex 3

2008-11-11 Thread Todd
From my readings around the web, the Flex compiler strips all timeline
information from the SWF when embedding.  I now have found a suggested
workaround over at Grant Skinner's Blog, however, it's dependent upon
all the code written on the timeline being put into a Class (this is
how I interpreted the workaround).

I'm going to look into probably using the Flash Component Tooklkit for
Flex and seeing if the dev can wrap up the Flash stuff into a
component and seeing where to go from there.

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

 hm, it seems that when embeded the compiler does not have enough
info to see
 if your variable is there or not (you mention that loading the swf
 dynamically works)...
 
 I remember reading somewhere in this forum that there is a compiler flag
 that makes things less strict and your error would get away, but...
never
 used it myself cannot remember the setting search the forum or
google for it
 
 On Tue, Nov 11, 2008 at 8:10 PM, Todd [EMAIL PROTECTED] wrote:
 
The symbol that I'm trying to get out of Flash is a global Array
  defenition, so I'm not sure it's working. I did try embedding the
  name of the public global array as a seperate embed.
 
  I'm not too interested in the Flex Component Kit for Flash, as this
  component is already written.
 
  My main goal is just accessesing the global flash variable from within
  Flex.
 
  --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com,
Amy
  amyblankenship@ wrote:
  
   --- In flexcoders@yahoogroups.com
flexcoders%40yahoogroups.com, Todd
  tprekaski@ wrote:
   
OK, a little more research tells me that the Flex compiler
strips out
all timeline code from the embedded Flash timeline.
   
So, now my question becomes: How do I expose a property from FLASH
that is accessible from Flex?
  
   I know you've already gotten an answer about the Component Kit,
but I
   think if you're not doing anything complex, you can just embed the
   symbol from the library. I believe that does respect the
timeline code.
  
   http://livedocs.adobe.com/flex/3/html/embed_4.html
  
 
   
 
 
 
 
 -- 
 Fotis Chatzinikos, Ph.D.
 Founder,
 Phinnovation
 [EMAIL PROTECTED],





[flexcoders] Programatically skinning a container, but what to do about the nested children?

2008-10-28 Thread Todd
I've created a custom skin and applied it to a VBox.  This skin isn't
just a regular border, but has some file-tab like protrusion on one
side.  The border looks like:

   ___
   | |
   | |
   ---|  |
 XX   |  |
  

(The area with the X's shouldn't calculate in parent's child layout.)

Now my question is, is there's something inside the skin that I can
set to mask off where controls are allowed to be laid out?  Or, do I
just have to manually make sure that layout of controls in the parent
container are manually adjusted for my programmatic skin?

What's the best way to deal with this.  Ideally, my skin would notify
the container to a valid layout area.

Thanks



[flexcoders] Re: Programatically skinning a container, but what to do about the nested children?

2008-10-28 Thread Todd
Crap, the email messed up my beautifully renditioned ASCII art of what
I was drawing.  Anyway, I was basically trying to show that there's a
hanging tab off the main part of the container, effectively increasing
the size of the container.

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

 I've created a custom skin and applied it to a VBox.  This skin isn't
 just a regular border, but has some file-tab like protrusion on one
 side.  The border looks like:
 
___
| |
| |
---|  |
  XX   |  |
   
 
 (The area with the X's shouldn't calculate in parent's child layout.)
 
 Now my question is, is there's something inside the skin that I can
 set to mask off where controls are allowed to be laid out?  Or, do I
 just have to manually make sure that layout of controls in the parent
 container are manually adjusted for my programmatic skin?
 
 What's the best way to deal with this.  Ideally, my skin would notify
 the container to a valid layout area.
 
 Thanks





[flexcoders] Re: Programatically skinning a container, but what to do about the nested children?

2008-10-28 Thread Todd
I need more than just straight offsets (either right, left, top,
bottom, etc.)..  The border Metrics will get me so far, but what about
the odd shaped parts that my skin wraps around?

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

 Hi,
 Try subclassing RectangularBorder instead, then you can override the
 borderMetrics property and set it based on how much right offset you
need.
 
 Mike
 
 On Tue, Oct 28, 2008 at 4:28 PM, Todd [EMAIL PROTECTED] wrote:
 
Crap, the email messed up my beautifully renditioned ASCII art
of what
  I was drawing. Anyway, I was basically trying to show that there's a
  hanging tab off the main part of the container, effectively increasing
  the size of the container.
 
 
  --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com,
Todd
  tprekaski@ wrote:
  
   I've created a custom skin and applied it to a VBox. This skin isn't
   just a regular border, but has some file-tab like protrusion on one
   side. The border looks like:
  
   ___
   | |
   | |
   ---| |
   XX | |
   
  
   (The area with the X's shouldn't calculate in parent's child
layout.)
  
   Now my question is, is there's something inside the skin that I can
   set to mask off where controls are allowed to be laid out? Or, do I
   just have to manually make sure that layout of controls in the
parent
   container are manually adjusted for my programmatic skin?
  
   What's the best way to deal with this. Ideally, my skin would notify
   the container to a valid layout area.
  
   Thanks
  
 
   
 
 
 
 
 -- 
 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] Re: WebService operation faults propigating up to WebService fault handler.

2008-10-20 Thread Todd
This is a good idea and exactly what I'm going to try now.  This will
cover about 98% of my commands, and will have the advantage of both
faults coming from the operations and the service level to have the
same handler.

I guess at this point, I really want to understand the AsyncToken
stuff in relation to Cairngorm design, so I think I'll post over to
the cairngorm list.  It's probably really a best practices that I'm
looking for.

Thanks Tracy for the suggestinos.

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

 So can you leave the fault handler on the service and not user the ones
 on the operations?  Or point those to some dummy handler?
 
 Tracy
 
  
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of Todd
 Sent: Thursday, October 16, 2008 3:25 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: WebService operation faults propigating up to
 WebService fault handler.
 
  
 
 Hmmm...interesting.
 
 I got into the Responders/AsyncTokens because that's how all the
 Cairngorm samples were setup. 
 
 But with what you say, it's very consistent with all the samples using
 MXML WebServices...putting a fault on the operation. But with faults
 on the operation, what happens when Flex can't even call the operation
 because of a SOAPEncoder error?
 
 Originally, all was fine with using Responders, but then I noticed
 that errors from the SOAPEncoder were getting swallowed, and when Flex
 tried building a SOAP message, but couldn't because of some improper
 format, nothing would happen. It would sit there. Adding an error
 handler to the actual service solved that. 
 
 Now, however, I'm stuck with Responder's handling faults, and the
 actual WebService handling faults. I'd like to at least not have the
 Web Service fault trigger if the responder handled it.
 
 I'm about 12 Web Services, 140+ calls into this thing. I don't think
 it'll be possible for me to get rid of my Responder cairngorm
 infrastructure...but I'd like to at least get a handle on how/where
 the faults are raised from.
 
 Had I done this again, I'd probably take your approach of having a
 single handler, use that as the master that subs things out depending
 upon the type of response. This would have the benefit of a single
 point in dealing with the Flex services layer...
 
 --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 , Tracy Spratt tspratt@ wrote:
 
  Do you need the fault handler on the operation? I typically a single
  fault handler for all operations. I also use a single handler for all
  results as well, actually. I don't like using responders.
  
  
  
  Tracy
  
  
  
  
  
  From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 ] On
  Behalf Of Todd
  Sent: Thursday, October 16, 2008 12:37 PM
  To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 
  Subject: [flexcoders] Re: WebService operation faults propigating up
 to
  WebService fault handler.
  
  
  
  I'll bounce this back up as it's hard to find any source code samples
  using the Actionscript version of WebService, and properly handling
  all the different errors, etc...
  
  Thanks,
  
  --- In flexcoders@yahoogroups.com
 mailto:flexcoders%40yahoogroups.com
 mailto:flexcoders%40yahoogroups.com
  , Todd tprekaski@ wrote:
  
   Hello All,
   I have a problem that I can't figure out. With WebService faults,
   and operations that return SOAPFaults...read on for the detais.
   
   1) I've created my WebService through ActionScript (not the MXML
   Component).
   var ws:WebService = new WebService();
   
   2) I've attached a fault listener to it. I had to do this because
   it seems that SOAPEncoder errors were never being caught otherwise.
   ws.addEventListener(FaultEvent.FAULT, onServiceFault)
   
   3) I'm using a Cairngorm Command/ServiceDelegate calling scheme. 
   For example, to call getInvoices, I have a command that calls into
 the
   appropriate method on the ServiceDelegate called getInvoices, which
   looks like:
   public function getInvoices(params:Object):void{ 
   Operation(ws.SearchInvoices).encoder.strictNillability = true;
   var token:AsyncToken = ws.SearchInvoices(params);
   token.addResponder(this.responder);
   }
   
   As you can see, I'm using the AsyncToken, and adding the Commmand as
   the responder. The Command has both fault and result handlers as
   defined by the IResponder interface.
   
   4) The this.responder is set during the contstructor of the
   Service Delegate, like so:
   public function ServiceDelegate(responder:IResponder)
   {
   this.responder = responder;
   }
   
   So, now my problem is, that when a SOAPFault is raised in the call
 to
   the SearchInvoices WebService operation, both the FAULT on my
 Command
   (which is the responder), AND the fault (onServiceFault

[flexcoders] Re: WebService operation faults propigating up to WebService fault handler.

2008-10-16 Thread Todd
I'll bounce this back up as it's hard to find any source code samples
using the Actionscript version of WebService, and properly handling
all the different errors, etc...

Thanks,


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

 Hello All,
   I have a problem that I can't figure out.  With WebService faults,
 and operations that return SOAPFaults...read on for the detais.
 
   1)  I've created my WebService through ActionScript (not the MXML
 Component).
  var ws:WebService = new WebService();
 
   2)   I've attached a fault listener to it.  I had to do this because
 it seems that SOAPEncoder errors were never being caught otherwise.
  ws.addEventListener(FaultEvent.FAULT, onServiceFault)
 
   3)  I'm using a Cairngorm Command/ServiceDelegate calling scheme. 
 For example, to call getInvoices, I have a command that calls into the
 appropriate method on the ServiceDelegate called getInvoices, which
 looks like:
   public function getInvoices(params:Object):void{
   Operation(ws.SearchInvoices).encoder.strictNillability = true;
   var token:AsyncToken = ws.SearchInvoices(params);
   token.addResponder(this.responder);
   }
 
 As you can see, I'm using the AsyncToken, and adding the Commmand as
 the responder.  The Command has both fault and result handlers as
 defined by the IResponder interface.
 
4)  The this.responder is set during the contstructor of the
 Service Delegate, like so:
 public function ServiceDelegate(responder:IResponder)
 {
  this.responder = responder;
 }
 
 So, now my problem is, that when a SOAPFault is raised in the call to
 the SearchInvoices WebService operation, both the FAULT on my Command
 (which is the responder), AND  the fault (onServiceFault ) for the
 WebService definition.
 
 I'd really rather not have this happen, but can't really figure out
 exactly what's going on.  ALSO, I had to add the fault handler to the
 WebService because we were having all sorts of SOAPEncoder errors that
 were never being raised.
 
 What's someone to do?  Is it that since I'm using the AsyncResponder
 to handle for the result/fault, that the WebService is never notified
 that the Fault has already been handled?  What's the proper design
 around this?  Is there a way to set the status that the Fault's been
 handled?  It almost seems like the fault is being raised twice.
 
 Thanks,
 Todd





[flexcoders] Re: WebService operation faults propigating up to WebService fault handler.

2008-10-16 Thread Todd
Hmmm...interesting.

I got into the Responders/AsyncTokens because that's how all the
Cairngorm samples were setup.  

But with what you say, it's very consistent with all the samples using
MXML WebServices...putting a fault on the operation.  But with faults
on the operation, what happens when Flex can't even call the operation
because of a SOAPEncoder error?

Originally, all was fine with using Responders, but then I noticed
that errors from the SOAPEncoder were getting swallowed, and when Flex
tried building a SOAP message, but couldn't because of some improper
format, nothing would happen.  It would sit there.  Adding an error
handler to the actual service solved that.  

Now, however, I'm stuck with Responder's handling faults, and the
actual WebService handling faults.  I'd like to at least not have the
Web Service fault trigger if the responder handled it.

I'm about 12 Web Services, 140+ calls into this thing.  I don't think
it'll be possible for me to get rid of my Responder cairngorm
infrastructure...but I'd like to at least get a handle on how/where
the faults are raised from.

Had  I done this again, I'd probably take your approach of having a
single handler, use that as the master that subs things out depending
upon the type of response.  This would have the benefit of a single
point in dealing with the Flex services layer...

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

 Do you need the fault handler on the operation?  I typically a single
 fault handler for all operations.  I also use a single handler for all
 results as well, actually.  I don't like using responders.
 
  
 
 Tracy
 
  
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of Todd
 Sent: Thursday, October 16, 2008 12:37 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: WebService operation faults propigating up to
 WebService fault handler.
 
  
 
 I'll bounce this back up as it's hard to find any source code samples
 using the Actionscript version of WebService, and properly handling
 all the different errors, etc...
 
 Thanks,
 
 --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 , Todd tprekaski@ wrote:
 
  Hello All,
  I have a problem that I can't figure out. With WebService faults,
  and operations that return SOAPFaults...read on for the detais.
  
  1) I've created my WebService through ActionScript (not the MXML
  Component).
  var ws:WebService = new WebService();
  
  2) I've attached a fault listener to it. I had to do this because
  it seems that SOAPEncoder errors were never being caught otherwise.
  ws.addEventListener(FaultEvent.FAULT, onServiceFault)
  
  3) I'm using a Cairngorm Command/ServiceDelegate calling scheme. 
  For example, to call getInvoices, I have a command that calls into the
  appropriate method on the ServiceDelegate called getInvoices, which
  looks like:
  public function getInvoices(params:Object):void{ 
  Operation(ws.SearchInvoices).encoder.strictNillability = true;
  var token:AsyncToken = ws.SearchInvoices(params);
  token.addResponder(this.responder);
  }
  
  As you can see, I'm using the AsyncToken, and adding the Commmand as
  the responder. The Command has both fault and result handlers as
  defined by the IResponder interface.
  
  4) The this.responder is set during the contstructor of the
  Service Delegate, like so:
  public function ServiceDelegate(responder:IResponder)
  {
  this.responder = responder;
  }
  
  So, now my problem is, that when a SOAPFault is raised in the call to
  the SearchInvoices WebService operation, both the FAULT on my Command
  (which is the responder), AND the fault (onServiceFault ) for the
  WebService definition.
  
  I'd really rather not have this happen, but can't really figure out
  exactly what's going on. ALSO, I had to add the fault handler to the
  WebService because we were having all sorts of SOAPEncoder errors that
  were never being raised.
  
  What's someone to do? Is it that since I'm using the AsyncResponder
  to handle for the result/fault, that the WebService is never notified
  that the Fault has already been handled? What's the proper design
  around this? Is there a way to set the status that the Fault's been
  handled? It almost seems like the fault is being raised twice.
  
  Thanks,
  Todd
 





[flexcoders] WebService operation faults propigating up to WebService fault handler.

2008-10-15 Thread Todd
Hello All,
  I have a problem that I can't figure out.  With WebService faults,
and operations that return SOAPFaults...read on for the detais.

  1)  I've created my WebService through ActionScript (not the MXML
Component).
 var ws:WebService = new WebService();

  2)   I've attached a fault listener to it.  I had to do this because
it seems that SOAPEncoder errors were never being caught otherwise.
 ws.addEventListener(FaultEvent.FAULT, onServiceFault)

  3)  I'm using a Cairngorm Command/ServiceDelegate calling scheme. 
For example, to call getInvoices, I have a command that calls into the
appropriate method on the ServiceDelegate called getInvoices, which
looks like:
  public function getInvoices(params:Object):void{  
  Operation(ws.SearchInvoices).encoder.strictNillability = true;
  var token:AsyncToken = ws.SearchInvoices(params);
  token.addResponder(this.responder);
  }

As you can see, I'm using the AsyncToken, and adding the Commmand as
the responder.  The Command has both fault and result handlers as
defined by the IResponder interface.

   4)  The this.responder is set during the contstructor of the
Service Delegate, like so:
public function ServiceDelegate(responder:IResponder)
{
 this.responder = responder;
}

So, now my problem is, that when a SOAPFault is raised in the call to
the SearchInvoices WebService operation, both the FAULT on my Command
(which is the responder), AND  the fault (onServiceFault ) for the
WebService definition.

I'd really rather not have this happen, but can't really figure out
exactly what's going on.  ALSO, I had to add the fault handler to the
WebService because we were having all sorts of SOAPEncoder errors that
were never being raised.

What's someone to do?  Is it that since I'm using the AsyncResponder
to handle for the result/fault, that the WebService is never notified
that the Fault has already been handled?  What's the proper design
around this?  Is there a way to set the status that the Fault's been
handled?  It almost seems like the fault is being raised twice.

Thanks,
Todd




[flexcoders] Re: Is it possible to change showDelay for only errorTips?

2008-09-23 Thread Todd
Also, it'd be great for a solution that doesn't involve patching the
original ToolTipManager class.

Thanks,
Todd

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

 Hello All,
   I know about ToolTipmanager.showDelay.  But I want to only affect
 the showDelay for errorTips, while leaving the rest of the tooltips to
 display with a proper delay.  I'd like to have our errorTips
 immediately display.  Or, if you have any other suggestions on getting
 the errorTip tooltips to display immediately on a mouseover of the
 component it's attached to, I'm all ears.
 
 Thanks,
 Todd





[flexcoders] Is it possible to change showDelay for only errorTips?

2008-09-22 Thread Todd
Hello All,
  I know about ToolTipmanager.showDelay.  But I want to only affect
the showDelay for errorTips, while leaving the rest of the tooltips to
display with a proper delay.  I'd like to have our errorTips
immediately display.  Or, if you have any other suggestions on getting
the errorTip tooltips to display immediately on a mouseover of the
component it's attached to, I'm all ears.

Thanks,
Todd



[flexcoders] Flex SDK 3.1 changes to WebServices breaking existing services...

2008-09-03 Thread Todd
Hello All,

   If have some existing web services that were broken when I upgraded
to the 3.1 flex SDK.  I believe it has to do with the SOAP Decoder.  I
needed to get the newest SDK because there were other fixes I was
awaiting.

I have an Actionscript type that I'm decoding through the
SchemaTypeRegistry:
public class FooDogVO implements IValueObject
{
  public var quantityBasedFunding : Boolean;
  public var numRecordsOrdered : int;
  public var numRecordsForPurchase : int;
  public var invoiceItems : ArrayCollection = new ArrayCollection(); 
  public var fundedQuantityAccounts : ArrayCollection = new
ArrayCollection(); 
  public var paymentAccounts : ArrayCollection = new ArrayCollection(); 
  ...
 }

I'm calling a WebService that is returning the following SOAP Type,
that is mapped via the SchemaTypeRegister to FooDogVO:

xsd:complexType name=FooDogType
xsd:sequence
  xsd:element name=numRecordsOrdered type=xsd:int/
  xsd:element name=quantityBasedFunding type=xsd:boolean/
  xsd:element maxOccurs=1 minOccurs=0 name=fundedQuantityAccounts
  xsd:complexType
  xsd:sequence
  xsd:element maxOccurs=unbounded minOccurs=0
name=fundedQuantityAccount type=PaymentOptionType/
  /xsd:sequence
  /xsd:complexType
  /xsd:element
  xsd:element name=numRecordsForPurchase type=xsd:int/
  xsd:element maxOccurs=1 minOccurs=0 name=invoiceItems
  xsd:complexType
  xsd:sequence
  xsd:element maxOccurs=unbounded minOccurs=0
name=invoiceItem type=InvoiceItemType/
  /xsd:sequence
  /xsd:complexType
  /xsd:element
  xsd:element name=total type=xsd:double/
  xsd:element maxOccurs=1 minOccurs=0 name=paymentAccounts
  xsd:complexType
  xsd:sequence
  xsd:element maxOccurs=unbounded minOccurs=0
name=paymentAccount type=PaymentOptionType/
  /xsd:sequence
  /xsd:complexType
  /xsd:element
  xsd:element name=applied type=xsd:double/
  xsd:element name=remaining type=xsd:double/
  xsd:element name=allowNewCreditCard type=xsd:boolean/
xsd:element maxOccurs=1 minOccurs=0 name=newCreditCard
type=PaymentOptionType/
/xsd:sequence
/xsd:complexType

Before the Flex 3.1 update, The SOAP decoder properly made the
FooDogVO.paymentAccounts property an ArrayCollection of
PaymentOptionTypes.

Now, however, with the Flex 3.1 SDK update, the FoDogVO.paymentAccouns
is an ArrayCollection to an ArrayCollection of PaymentOptionTypes. 
It's now FooDogVO.paymentAccounts.[ArrayCollection of PaymentOptionTypes]

So, I'm looking at the list of Bug fixes for Flex SDK 3.1 and I find
the following two bugs:
https://bugs.adobe.com/jira/browse/SDK-14321
https://bugs.adobe.com/jira/browse/SDK-14871

But I'm not really sure what's going on with the new Soap Decoder
stuff.  It seems like I was inadvertently performing a workaround
before, but what really should be the proper mapping of elements of
completTypes to ArrayCollections?

Thanks for any input on a) what's going on b) how I should properly be
handling this, whether on the Web Service side, or the Flex client. 
Naturally, I can always manually remap the properties when the Soap
result completes, keeping my VOs (which the application is coded
against) the same, but ideally, I'd just do the right thing with the
SOAP Decoder/Schema Type registry.

Thanks,
Todd




[flexcoders] Re: Flex SDK 3.1 changes to WebServices breaking existing services...

2008-09-03 Thread Todd
The only real changes (those that aren't ASDoc comments to the core
Flex code) I see in the the mx.rpc.soap package is in the
SOAPArrayType.as.

FYI, I was happily using the 3.0.676 framework (which was post 3.0
release).


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

 Hello All,
 
If have some existing web services that were broken when I upgraded
 to the 3.1 flex SDK.  I believe it has to do with the SOAP Decoder.  I
 needed to get the newest SDK because there were other fixes I was
 awaiting.
 
 I have an Actionscript type that I'm decoding through the
 SchemaTypeRegistry:
 public class FooDogVO implements IValueObject
 {
   public var quantityBasedFunding : Boolean;
   public var numRecordsOrdered : int;
   public var numRecordsForPurchase : int;
   public var invoiceItems : ArrayCollection = new ArrayCollection(); 
   public var fundedQuantityAccounts : ArrayCollection = new
 ArrayCollection(); 
   public var paymentAccounts : ArrayCollection = new ArrayCollection(); 
   ...
  }
 
 I'm calling a WebService that is returning the following SOAP Type,
 that is mapped via the SchemaTypeRegister to FooDogVO:
 
 xsd:complexType name=FooDogType
 xsd:sequence
   xsd:element name=numRecordsOrdered type=xsd:int/
   xsd:element name=quantityBasedFunding type=xsd:boolean/
   xsd:element maxOccurs=1 minOccurs=0
name=fundedQuantityAccounts
   xsd:complexType
   xsd:sequence
   xsd:element maxOccurs=unbounded minOccurs=0
 name=fundedQuantityAccount type=PaymentOptionType/
   /xsd:sequence
   /xsd:complexType
   /xsd:element
   xsd:element name=numRecordsForPurchase type=xsd:int/
   xsd:element maxOccurs=1 minOccurs=0 name=invoiceItems
   xsd:complexType
   xsd:sequence
   xsd:element maxOccurs=unbounded minOccurs=0
 name=invoiceItem type=InvoiceItemType/
   /xsd:sequence
   /xsd:complexType
   /xsd:element
   xsd:element name=total type=xsd:double/
   xsd:element maxOccurs=1 minOccurs=0 name=paymentAccounts
   xsd:complexType
   xsd:sequence
   xsd:element maxOccurs=unbounded minOccurs=0
 name=paymentAccount type=PaymentOptionType/
   /xsd:sequence
   /xsd:complexType
   /xsd:element
   xsd:element name=applied type=xsd:double/
   xsd:element name=remaining type=xsd:double/
   xsd:element name=allowNewCreditCard type=xsd:boolean/
 xsd:element maxOccurs=1 minOccurs=0 name=newCreditCard
 type=PaymentOptionType/
 /xsd:sequence
 /xsd:complexType
 
 Before the Flex 3.1 update, The SOAP decoder properly made the
 FooDogVO.paymentAccounts property an ArrayCollection of
 PaymentOptionTypes.
 
 Now, however, with the Flex 3.1 SDK update, the FoDogVO.paymentAccouns
 is an ArrayCollection to an ArrayCollection of PaymentOptionTypes. 
 It's now FooDogVO.paymentAccounts.[ArrayCollection of
PaymentOptionTypes]
 
 So, I'm looking at the list of Bug fixes for Flex SDK 3.1 and I find
 the following two bugs:
 https://bugs.adobe.com/jira/browse/SDK-14321
 https://bugs.adobe.com/jira/browse/SDK-14871
 
 But I'm not really sure what's going on with the new Soap Decoder
 stuff.  It seems like I was inadvertently performing a workaround
 before, but what really should be the proper mapping of elements of
 completTypes to ArrayCollections?
 
 Thanks for any input on a) what's going on b) how I should properly be
 handling this, whether on the Web Service side, or the Flex client. 
 Naturally, I can always manually remap the properties when the Soap
 result completes, keeping my VOs (which the application is coded
 against) the same, but ideally, I'd just do the right thing with the
 SOAP Decoder/Schema Type registry.
 
 Thanks,
 Todd





[flexcoders] Re: Flex SDK 3.1 changes to WebServices breaking existing services...

2008-09-03 Thread Todd
I've sort of figured out new WSDL syntax that works as expected.  

If I change the WSDL declaration of paymentAccounts from:
xsd:element maxOccurs=1 minOccurs=0 name=paymentAccounts
  xsd:complexType
xsd:sequence
  xsd:element maxOccurs=unbounded minOccurs=0
   name=paymentAccount type=FooDogType/
 /xsd:sequence
   /xsd:complexType
/xsd:element

TO:
xsd:element maxOccurs=unbounded minOccurs=0
name=paymentAccounts type=FooDogVO /

It all seems to work.  This gets rid of some nested complexTypes and
sequence.

However, my bigger concern is changing all this code that worked
perfectly in 3.0 (10 services, 20 calls per service) and was probably
a workaround to make it work in 3.0..  What it does for the stability
of our code base.  

It seems that the backward compatibility of Flex and Web Services is a
bit sketchy, at best...especially because I don't know of other
situations that will need to be changed, too.   (This could be the
first of other problems that I've unleashed.)


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

 Todd, if you can mail me off-list with a .zip of failing code, I'll
be able
 to poke around and (probably) figure it out for you when I get home this
 afternoon.
 
 Cheers,
 -Josh
 
 On Thu, Sep 4, 2008 at 4:24 AM, Todd [EMAIL PROTECTED] wrote:
 
  The only real changes (those that aren't ASDoc comments to the core
  Flex code) I see in the the mx.rpc.soap package is in the
  SOAPArrayType.as.
 
  FYI, I was happily using the 3.0.676 framework (which was post 3.0
  release).
 
 
  --- In flexcoders@yahoogroups.com, Todd tprekaski@ wrote:
  
   Hello All,
  
  If have some existing web services that were broken when I
upgraded
   to the 3.1 flex SDK.  I believe it has to do with the SOAP
Decoder.  I
   needed to get the newest SDK because there were other fixes I was
   awaiting.
  
   I have an Actionscript type that I'm decoding through the
   SchemaTypeRegistry:
   public class FooDogVO implements IValueObject
   {
 public var quantityBasedFunding : Boolean;
 public var numRecordsOrdered : int;
 public var numRecordsForPurchase : int;
 public var invoiceItems : ArrayCollection = new ArrayCollection();
 public var fundedQuantityAccounts : ArrayCollection = new
   ArrayCollection();
 public var paymentAccounts : ArrayCollection = new
ArrayCollection();
 ...
}
  
   I'm calling a WebService that is returning the following SOAP Type,
   that is mapped via the SchemaTypeRegister to FooDogVO:
  
   xsd:complexType name=FooDogType
   xsd:sequence
 xsd:element name=numRecordsOrdered type=xsd:int/
 xsd:element name=quantityBasedFunding type=xsd:boolean/
 xsd:element maxOccurs=1 minOccurs=0
  name=fundedQuantityAccounts
 xsd:complexType
 xsd:sequence
 xsd:element maxOccurs=unbounded minOccurs=0
   name=fundedQuantityAccount type=PaymentOptionType/
 /xsd:sequence
 /xsd:complexType
 /xsd:element
 xsd:element name=numRecordsForPurchase type=xsd:int/
 xsd:element maxOccurs=1 minOccurs=0 name=invoiceItems
 xsd:complexType
 xsd:sequence
 xsd:element maxOccurs=unbounded minOccurs=0
   name=invoiceItem type=InvoiceItemType/
 /xsd:sequence
 /xsd:complexType
 /xsd:element
 xsd:element name=total type=xsd:double/
 xsd:element maxOccurs=1 minOccurs=0 name=paymentAccounts
 xsd:complexType
 xsd:sequence
 xsd:element maxOccurs=unbounded minOccurs=0
   name=paymentAccount type=PaymentOptionType/
 /xsd:sequence
 /xsd:complexType
 /xsd:element
 xsd:element name=applied type=xsd:double/
 xsd:element name=remaining type=xsd:double/
 xsd:element name=allowNewCreditCard type=xsd:boolean/
   xsd:element maxOccurs=1 minOccurs=0 name=newCreditCard
   type=PaymentOptionType/
   /xsd:sequence
   /xsd:complexType
  
   Before the Flex 3.1 update, The SOAP decoder properly made the
   FooDogVO.paymentAccounts property an ArrayCollection of
   PaymentOptionTypes.
  
   Now, however, with the Flex 3.1 SDK update, the
FoDogVO.paymentAccouns
   is an ArrayCollection to an ArrayCollection of PaymentOptionTypes.
   It's now FooDogVO.paymentAccounts.[ArrayCollection of
  PaymentOptionTypes]
  
   So, I'm looking at the list of Bug fixes for Flex SDK 3.1 and I find
   the following two bugs:
   https://bugs.adobe.com/jira/browse/SDK-14321
   https://bugs.adobe.com/jira/browse/SDK-14871
  
   But I'm not really sure what's going on with the new Soap Decoder
   stuff.  It seems like I was inadvertently performing a workaround
   before, but what really should be the proper mapping of elements of
   completTypes to ArrayCollections?
  
   Thanks for any input on a) what's going on b) how I should
properly be
   handling this, whether on the Web Service side, or the Flex client.
   Naturally, I can always manually remap

[flexcoders] Issues with mx:Text, mouse cursors, and Hrefs inside the text

2008-08-13 Thread Todd
Hello All,
  I'm using the mx:Text to render some htmlText complete with some
embedded href links.  My goal is to use the htmlText with a link (via
an href in the text), catch the event for the link, but treat the rest
of the text as a button in the parent.  Also, it's important to keep
the mouse pointer as either a arrow or hand.  Any suggestions?

  When I set the properties on the mx:Text with this: 
 mouseChildren=false
 buttonMode=true
 useHandCursor=true
The events for the LINK aren't raised, and the entire text area is
a button.  But the mouse pointer is functioning properly

  However, with the following settings, I get the proper
functionality, but the cursor over the text is selectable (and must be
to make the Link event fire):
 mouseChildren=true 
 buttonMode=false 
 useHandCursor=true

BTW, I've tried implementing the rolloever/rollout to change the
cursor, which it does.  But over the mx:Text it still shows the
selectable text.

Thanks,



[flexcoders] Re: WS call returning error from Flex 2

2008-04-03 Thread Todd
For debugging WebServices, I user a tool like SOAP UI
(http://www.soapui.org/  -- They have a free version, and I'd install
the stand-alone one, not the eclipse plug-in).  It allows you to send
test SOAP Envelopes to the Server, and to view the responses.  It also
has functionality that allows you to validate your Requests and
Responses to/from the server.

Most likely, what you're receives in your Flex application is some
random error from the server, like an invalid Soap response being
received.  

I'd turn tracing on in your FLEX application (add a mx:TraceTarget
level=0 / ) somewhere in the main part of your application.  Then
watch the Flex Builder output window for SOAP encoding messages and
grab the encoded soap request.  Load that text up into SOAP UI and
make a raw request to the server without even using FLEX.  This will
tell you if a) it's indeed just your server b) if the soap envelope
FLEX is creating on your behalf is formatted as the server expects.

Also, it might help to turn validation of SOAP Requests on in your
server, which I'm not sure exactly how to do in your setup.  You could
throw a generic message, or the specific validation failings when the
server receives the request.


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

 Hi
 
 I m trying to store data into database using Simple Pojo based Web
 Service, deployed in Axis. The Web Service is successfully storing
 string data, but is returning the following error when strring, date,
 long, and int values are sent as a request.
 The error goes like this:
 
 FaultEvent fault=[RPC Fault faultString=HTTP request error
 faultCode=Server.Error.Request faultDetail=Error: [IOErrorEvent
 type=ioError bubbles=false cancelable=false eventPhase=2 text=Error
 #2032: Stream Error. URL:
 http://localhost:80/axis2/services/servicename;]. URL:
 http://localhost:80/axis2/services/servicename;]
 messageId=D9765452-E4A1-C8DF-3739-136322F8C57C type=fault
 bubbles=false cancelable=true eventPhase=2]
 
 I found something related that has been reported as a bug to Adobe and
 has its status Closed.
 
 Here is the simple code used to send data to web service named WS
 
 /* someString1, mob below are of type TextInput, while date is
 a DateField */
 
 -
 
 WS.addEventListener(ResultEvent.RESULT, errorHandleFunction);
 WS.addRecord.request.someString1  = someString1.text.toString();
   
 WS.addRecord.request.mob  = mob.text.toString() + l;
 WS.addRecord.request.age= age.text.toString();
 WS.addRecord.request.someDate   = date.selectedDate;
   
 WS.addRecord.send();
 --
 
 /* l is suffixed to mobile since the Pojo web service has a
 corresponding long data type */
 
 what could be the problem for such an error?





Re: RES: [flexcoders] Resize very slow

2008-04-03 Thread Todd
Hello,  Here's a sample of the code.  As you can see, I'm manually
setting the txtDesc width to be based on it's container's dynamic width.
This is so the Text will linewrap correctly and for an indeterminate #
of lines

BTW, components.Text is just a wrapper around the standard mxml Text 
component.

mx:VBox width=100% verticalAlign=top verticalGap=0
 mx:VBox width=100% verticalAlign=top verticalGap=0
backgroundImage=assets/skin/bg_header.swf backgroundSize=100%
 mx:HBox width=100% verticalScrollPolicy=off
 mx:HBox verticalAlign=middle paddingLeft=10
paddingTop=10
 mx:Image source=assets/images/dm4_small.png/
 /mx:HBox
 mx:VBox horizontalAlign=right width=100%
height=100%
 mx:HBox
 components:LinkBar id=primaryNav
itemClick=navBarClick(event); d_styleName=headerLinkBar
d_dataProvider={model.appConfig.primaryNavigation}/
 /mx:HBox
 mx:VBox height=100% verticalAlign=bottom
horizontalAlign=right
 components:Label
d_text={model.currentUser.firstName == null ? '':'Welcome,
'+model.currentUser.firstName} d_styleName=footerCopy/
 /mx:VBox
 /mx:VBox
 /mx:HBox
 /mx:VBox
 mx:HBox width=100% height=50 horizontalGap=0
verticalAlign=top verticalGap=0
 mx:HBox width=200 horizontalAlign=center
verticalAlign=middle height=100%
 components:Text
d_text={model.currentScreenTitle}/
 /mx:HBox
 mx:VRule width=1 height=100%
strokeColor=#6E001C/
 mx:Spacer width=10/
 mx:HBox id=textDescriptionHolder
verticalAlign=top width=100%
 components:Text id=txtDesc
d_text={model.currentScreenDesc} left=0
width={textDescriptionHolder.width-5} d_height=100%/
 /mx:HBox
 /mx:HBox
 mx:HRule width=100% height=1 strokeColor=#6E001C/
 mx:Spacer height=10/
 /mx:VBox



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

 Sounds to me like you may be over-using the invalidateDisplayList()
???
 Without seeing some code – it is difficult to tell exactly what
might be the
 problem. Post something and we can take a look see.



 Rick Winscot





 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED]
On
 Behalf Of Todd
 Sent: Wednesday, April 02, 2008 10:20 AM
 To: flexcoders@yahoogroups.com
 Subject: Re: RES: [flexcoders] Resize very slow



 Hey All, I have a very similar question to this one, so I thought I'd
 continue this thread.

 I also have a slow redraw, because of one of my properties id
 dynamically bound to calculate the width based on another property.
 When making the screen larger, it does one redraw, however, when
 making it smaller, it does it's loop of calling resize everytime the
 control property changes. I'm trying to figure out if there's a way
 to supress the resize events until the parent has finished drawing, or
 something similar.

 I have to set the width because the component I'm resizing is a
 TextArea and I'm trying to force it to take up as many lines as it
 needs to render the length of text, which is all variable.

 Thanks for any suggestions.

 --- In flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com ,
 Luciano Manerich Junior
 luciano.manerich@ wrote:
 
  Hi,
 
  cant you use bottom=0?
 
  mx:Image id=myImage bottom=0 /
 
  You will not have to do that Math thing... But i dont believe that
 will really speed up...
 
  
 
  De: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 [mailto:flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com ]
 Em nome de shivkxr
  Enviada em: quinta-feira, 27 de março de 2008 16:30
  Para: flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com
  Assunto: [flexcoders] Resize very slow
 
 
 
  I have a canvas and a few controls within the canvas. On of these is
an
  image.
 
  Essentially, what I want is that the image appear towards the bottom
of
  the canvas, so what I do is this
 
  mx:Image id=myImage top={containerCanvas.height -
  myImage.height} /
 
  This works, except that when the canvas is sized to a different size
it
  looks like I have a slow motion effect in place. It takes quite a
few
  seconds (3-10) depending on the difference between the old and new
  height of the canvas.
 
  So is there a way to speed this up?
 





[flexcoders] Re: FLEX Images sandbox error

2008-04-03 Thread Todd
I believe Facebook will need to have a crossdomain.xml policy file on
their servers.

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

 I am trying to write a simple application that retrieves my pictures 
 from my Facebook account and then displays the images and run some 
 effects on it, e.g. fade, move, iris etc. Everything seems to work 
 except for the iris effect. I have done some research and found that 
 when I import pictures from another domain and want to work on their 
 bitmap data I need to set the checkPolicyFile property on the loader. 
 I did that and then I get an error 'No policy files granted access'. 
 The code is provided below. Any help is appreciated.
 
 Thanks,
 Noam
 
 =
 
 ?xml version=1.0 encoding=utf-8?
 mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; 
 layout=absolute
 
   mx:Script
   ![CDATA[
   
   [Bindable]   
   private var loaderContext : LoaderContext;
   
   private function imageInit() : void
   {
   loaderContext = new LoaderContext();
   loaderContext.checkPolicyFile = true;
   img.loaderContext = loaderContext;
   img.load('http://photos-
 a.ak.facebook.com/photos-ak-
 sf2p/v190/104/17/564197930/s564197930_459432_6972.jpg');
   }   
   
   ]]
   /mx:Script
   
   mx:Fade alphaFrom=0 alphaTo=1 id=fadeIn 
 target={img}/
   mx:Rotate angleFrom=0 angleTo=90 id=rotate 
 target={img}/
   mx:Rotate angleFrom=90 angleTo=0 id=rotateBack 
 target={img}/
   mx:Iris scaleXFrom=1 scaleXTo=0.01 id=iris1  
 target={img}/
   mx:Iris scaleXFrom=0.01 scaleXTo=1 id=irisBack  
 target={img}/
   mx:Move xFrom=0 xTo=50 id=move1 target={img}/
   mx:Move xFrom=50 xTo=0 id=move2 target={img}/
   mx:Panel width=50% height=50% horizontalAlign=center 
 verticalAlign=middle backgroundColor=black
   mx:VBox
   
   mx:Image id=img initialize=imageInit()/
   
   mx:Button label=fade click=fadeIn.play
 ()/
   mx:Button label=rotate click=rotate.play
 ()/
   mx:Button label=rotate Back 
 click=rotateBack.play()/
   mx:Button label=iris1 click=iris1.play
 ()/
   mx:Button label=iris Back 
 click=irisBack.play()/
   mx:Button label=move1 click=move1.play
 ()/
   mx:Button label=move2 click=move2.play
 ()/ 
   /mx:VBox
   /mx:Panel
   
 /mx:Application





[flexcoders] Re: FLEX Images sandbox error

2008-04-03 Thread Todd
I don't have specifics for #2 right now, but regarding #1, the
cross-domain file will need to exist for the servers t hat are
actually serving the images.  I seem to remember something similar
happening over at Flickr 6 minths ago where the API had a
cross-domain, but none of the image farms did.  They (Flickr)
eventually rectified the situation.

For #2, try reading this blog article, or teh comments off of it for
clues. 
http://www.yswfblog.com/blog/2007/08/29/flickr-now-even-more-flash-friendly/

There's some sample code (in response to my question about something
very similar):
var loader:Loader = new Loader();
var context:LoaderContext = new LoaderContext();
context.checkPolicyFile = true;
loader.load(URLRequestToFlickr, context);

Hope this points you in the right direction


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

 Hi Tod,
 
 2 things:
 
 1. There is a crossdomain.xml at the following address: 
 http://api.facebook.com/crossdomain.xml but I'm not sure if this is 
 the same server
 2. If the crossdomain file does not exist, why isn't the error 'A 
 policy file is required, but the checkPolicyFile flag was not set 
 when this media was loaded.'?
 
 
 --- In flexcoders@yahoogroups.com, Todd tprekaski@ wrote:
 
  I believe Facebook will need to have a crossdomain.xml policy file 
 on
  their servers.
  
  --- In flexcoders@yahoogroups.com, noam.malter noam.malter@ 
 wrote:
  
   I am trying to write a simple application that retrieves my 
 pictures 
   from my Facebook account and then displays the images and run 
 some 
   effects on it, e.g. fade, move, iris etc. Everything seems to 
 work 
   except for the iris effect. I have done some research and found 
 that 
   when I import pictures from another domain and want to work on 
 their 
   bitmap data I need to set the checkPolicyFile property on the 
 loader. 
   I did that and then I get an error 'No policy files granted 
 access'. 
   The code is provided below. Any help is appreciated.
   
   Thanks,
   Noam
   
   =
   
   ?xml version=1.0 encoding=utf-8?
   mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; 
   layout=absolute
   
 mx:Script
 ![CDATA[
 
 [Bindable]   
 private var loaderContext : LoaderContext;
 
 private function imageInit() : void
 {
 loaderContext = new LoaderContext();
 loaderContext.checkPolicyFile = true;
 img.loaderContext = loaderContext;
 img.load('http://photos-
   a.ak.facebook.com/photos-ak-
   sf2p/v190/104/17/564197930/s564197930_459432_6972.jpg');
 }   
 
 ]]
 /mx:Script
 
 mx:Fade alphaFrom=0 alphaTo=1 id=fadeIn 
   target={img}/
 mx:Rotate angleFrom=0 angleTo=90 id=rotate 
   target={img}/
 mx:Rotate angleFrom=90 angleTo=0 id=rotateBack 
   target={img}/
 mx:Iris scaleXFrom=1 scaleXTo=0.01 id=iris1  
   target={img}/
 mx:Iris scaleXFrom=0.01 scaleXTo=1 id=irisBack  
   target={img}/
 mx:Move xFrom=0 xTo=50 id=move1 target={img}/
 mx:Move xFrom=50 xTo=0 id=move2 target={img}/
 mx:Panel width=50% height=50% horizontalAlign=center 
   verticalAlign=middle backgroundColor=black
 mx:VBox
 
 mx:Image id=img initialize=imageInit()/
 
 mx:Button label=fade click=fadeIn.play
   ()/
 mx:Button label=rotate click=rotate.play
   ()/
 mx:Button label=rotate Back 
   click=rotateBack.play()/
 mx:Button label=iris1 click=iris1.play
   ()/
 mx:Button label=iris Back 
   click=irisBack.play()/
 mx:Button label=move1 click=move1.play
   ()/
 mx:Button label=move2 click=move2.play
   ()/ 
 /mx:VBox
 /mx:Panel
 
   /mx:Application
  
 





Re: RES: [flexcoders] Resize very slow

2008-04-02 Thread Todd
Hey All, I have a very similar question to this one, so I thought I'd
continue this thread.

I also have a slow redraw, because of one of my properties id
dynamically bound to calculate the width based on another property. 
When making the screen larger, it does one redraw, however, when
making it smaller, it does it's loop of calling resize everytime the
control property changes.  I'm trying to figure out if there's a way
to supress the resize events until the parent has finished drawing, or
something similar.

I have to set the width because the component I'm resizing is a
TextArea and I'm trying to force it to take up as many lines as it
needs to render the length of text, which is all variable.

Thanks for any suggestions.

--- In flexcoders@yahoogroups.com, Luciano Manerich Junior
[EMAIL PROTECTED] wrote:

 Hi,
  
 cant you use bottom=0?
  
 mx:Image id=myImage bottom=0 /
  
 You will not have to do that Math thing... But i dont believe that
will really speed up...
 
 
 
 De: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED]
Em nome de shivkxr
 Enviada em: quinta-feira, 27 de março de 2008 16:30
 Para: flexcoders@yahoogroups.com
 Assunto: [flexcoders] Resize very slow
 
 
 
 I have a canvas and a few controls within the canvas. On of these is an 
 image.
 
 Essentially, what I want is that the image appear towards the bottom of 
 the canvas, so what I do is this
 
 mx:Image id=myImage top={containerCanvas.height - 
 myImage.height} /
 
 This works, except that when the canvas is sized to a different size it 
 looks like I have a slow motion effect in place. It takes quite a few 
 seconds (3-10) depending on the difference between the old and new 
 height of the canvas.
 
 So is there a way to speed this up?





[flexcoders] Re: Cairngorm for Flex 3

2008-03-27 Thread Todd
Just drop the Cairngorm.swc file into your Flex 3 project lib folder
and you're good to go.

BTW, I'm pretty sure Cairngorm actually references Flex specific
things, like the IResponder, so it's not that it's only Actionscript
3, like the person above suggested.  Its only referencing interfaces
that haven't changed from Flex 2.

(Someone who knows the innards more can chime in, I'm just using it.)

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

 Hi
 
 I want to use Cairngorm for a project we are going to start but in this 
 site: http://labs.adobe.com/wiki/index.php/Cairngorm I only see
versions 
 for Flex 2.
 
 I'd like to know if there is a new version for Flex 3 coming soon or 
 what's going to happen with Cairngorm.
 
 Regards
 -- 
 Leonardo Moreno Guzmán
 Ingeniero de sistemas y telemática | Asesor soluciones informáticas
 *cell-phone:* 311-3390386
 *e-mail:* [EMAIL PROTECTED]
 *site:*   http://leo.logtar.com/profesional/





[flexcoders] Why are my embedded TrueType Fonts looking so horrible in Flex App

2008-03-13 Thread Todd
Hello All,
   I've embeded a True Type Font (Agency FB) into my Flex application. 
However, it looks terrible compared to the same font, same size, same
weight in MS Excel.
   Any insights on how I can improve this, or what's going on?
   I don't care about swf size in this particular app, if that helps with
a solution.

See the image of comparing the Flex app vs MS Excel at Flickr:
http://www.flickr.com/photos/taude/2331526186/

As you can tell, the embedded Flex font is smaller and more tightly
packed together.

Thanks for any help




[flexcoders] Re: Kiosk support in AIR?

2008-03-13 Thread Todd

I think more of what you're looking for is an operating system level
control of switching apps and such.

You can display an AIR app at fullscreen and not even have a close
button the thing so it would work from that standpoint.  But then you
have the whole operating system functionality that needs to be disabled.

You should google for KIOSK software and you'll find lots of
specialized web-browsers and software that limits what the OS can
d...for a variety of platforms.  I've seen these tools used before for
plain Flash applications running in a locked-down web browser, but I
don't remember the details...

AIR shouldn't be in charge of limiting application switching, the task
bar, etc..., that's up to the OS.  


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

 So the FAQ on the old labs site for AIR noted that kiosk support was
 planned, but it gave no mention of which specific kiosk-bits of
 functionality would be available. Anyone know if this made it in and
if so
 what/where? 
 
  
 

(http://labs.adobe.com/wiki/index.php/AIR:Developer_FAQ#Can_I_create_CD-ROM_
 or_kiosk_applications_that_leverage_Adobe_AIR.3F)
 
  
 
 I'm looking for a few specific settings like locking in full screen,
 disabling program exit (hotkey) and application switching – but would be
 curious also as to what else was put in. I imagine I could intercept
some of
 that and force it to behave similarly, but there would be some
 platform-specific logic in there that would defeat the purpose of
using a
 platform independent vm/framework…
 
  
 
 Thanks in advance,
 
  
 
 Beau Scott
 
  
 
 
 No virus found in this outgoing message.
 Checked by AVG. 
 Version: 7.5.518 / Virus Database: 269.21.7/1327 - Release Date:
3/12/2008
 1:27 PM





[flexcoders] Re: Why are my embedded TrueType Fonts looking so horrible in Flex App

2008-03-13 Thread Todd
Yes, I've been experimenting with the sizes.  It helps, but I do
notice strange rendering's with italics and underlined words.  Thanks
for the pointer that Flex does font sizing in pixels.

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

 I'm not sure if this will solve your problem, but for what it's worth,
 Flex font sizes are calculated in pixels, and *not* in points. This
 means that setting the font to the same size will make it a little
 smaller in Flex. Try bumping up the font size a couple of pixels and see
 if that helps.
 
 -- 
 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] Why are my embedded TrueType Fonts looking so
 horrible in Flex App
 Date: Thu, 13 Mar 2008 16:44:35 -
 
 Hello All,
 I've embeded a True Type Font (Agency FB) into my Flex application. 
 However, it looks terrible compared to the same font, same size, same
 weight in MS Excel.
 Any insights on how I can improve this, or what's going on?
 I don't care about swf size in this particular app, if that helps with
 a solution.
 
 See the image of comparing the Flex app vs MS Excel at Flickr:
 http://www.flickr.com/photos/taude/2331526186/
 
 As you can tell, the embedded Flex font is smaller and more tightly
 packed together.
 
 Thanks for any help





[flexcoders] Re: WebServices (FB3) - SOAPEncoder does not understand WSDL subtypes???

2008-03-13 Thread Todd
In the DOcs for Flex 3
http://livedocs.adobe.com/labs/flex3/html/help.html?content=data_access_3.html

At the end, there's the following sections: The following XML Schema
structures or structure attributes are ignored and are not supported
in Flex 3:

complexType
final=...
block=...
mixed=...
abstract=.../

Looks like abstract isn't supported.

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

 
 In WSDL I have a complex type that contains an element type of an
 abstract type T1.  Then I have the concrete complex type T2 that extends
 from T1.
 
 My WebService request contains an instance of T2 (which is also type of
 T1 as it extends from it). However, the SOAPEncoder ignores all its
 content and instead uses T1 (which is abstrace, it has nothing).
 SOAPEncoder.encodeRequest() results in a bad (incomplete) SOAP message
 = the Web Service request fails.
 
 Is this a known Flex Builder 3 bug?
 
 Thanks, Robert





[flexcoders] Re: Why are my embedded TrueType Fonts looking so horrible in Flex App

2008-03-13 Thread Todd
I went ahead and compiled my font into a swf as suggested in the bug
fix.  (though my bug isn't exactly the same.)

Using my font from a SWF seams to fix a lot of problems.  Almost so
much so, that it seems that putting a font in a SWF seems to be the
default way anyone should consider for embedding fonts into a flex
application.

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

 Todd,
 We have seen this too, I filed a Jira ticket about this in the Adobe
 bug tracking system here:
 https://bugs.adobe.com/jira/browse/SDK-14955?rc=1
 If you have any additional comments or insight please comment on that
 ticket so we can provide Adobe with as much info as possible to get this
 resolved correctly.
  
 Blake
 P.S. Check out the workaround I came up with mentioned in that bug.
 
  
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of Todd
 Sent: Thursday, March 13, 2008 12:14 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: Why are my embedded TrueType Fonts looking so
 horrible in Flex App
 
 
 
 Yes, I've been experimenting with the sizes. It helps, but I do
 notice strange rendering's with italics and underlined words. Thanks
 for the pointer that Flex does font sizing in pixels.
 
 --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 , Maciek Sakrejda msakrejda@ wrote:
 
  I'm not sure if this will solve your problem, but for what it's worth,
  Flex font sizes are calculated in pixels, and *not* in points. This
  means that setting the font to the same size will make it a little
  smaller in Flex. Try bumping up the font size a couple of pixels and
 see
  if that helps.
  
  -- 
  Maciek Sakrejda
  Truviso, Inc.
  http://www.truviso.com http://www.truviso.com 
  
  -Original Message-
  From: Todd tprekaski@
  Reply-To: flexcoders@yahoogroups.com
 mailto:flexcoders%40yahoogroups.com 
  To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 
  Subject: [flexcoders] Why are my embedded TrueType Fonts looking so
  horrible in Flex App
  Date: Thu, 13 Mar 2008 16:44:35 -
  
  Hello All,
  I've embeded a True Type Font (Agency FB) into my Flex application. 
  However, it looks terrible compared to the same font, same size, same
  weight in MS Excel.
  Any insights on how I can improve this, or what's going on?
  I don't care about swf size in this particular app, if that helps with
  a solution.
  
  See the image of comparing the Flex app vs MS Excel at Flickr:
  http://www.flickr.com/photos/taude/2331526186/
 http://www.flickr.com/photos/taude/2331526186/ 
  
  As you can tell, the embedded Flex font is smaller and more tightly
  packed together.
  
  Thanks for any help
 





[flexcoders] Rollout Event not being fired from PopupWindow everytime

2008-03-13 Thread Todd
Hello All,
  I have a pretty complex issue going on where the Mouse.ROLL_OUT
event isn't always being fired when leaving a PopupWindow.  I've
searched around the net and haven't really found any writings on it. 
  It's fairly easy to duplicate, and I've created a very simple
project to demonstrate the issue.
  
Here's the main Flex app code, the test application can be seen at
(source code enabled):
http://www.simplifiedchaos.com/bug/TestPopupBug.html

To get the popup window to stick, just start swiping the mouse across
the three column headers that read Column1.  Another way to make it
stick is just swipe the mouse vertically across the column header, and
after a several tries, you'll see a stuck popup.  If you load the
source code on your machine and watch the  trace statements, you'll
see that when the popup sticks that onWindowRollout is never called
even though the mouse left the window.   

I'm always open for implementing the functionality another way, which is:
1) There's a column header that when the mouse rolls over it displays
a popupmenu.
2) The popup menu can be wider than the column, so the need to use
PopupWindow and not a technique that uses another control inside the
same column VBox or HBox that is just invisible.
3) The popupwindow should stay visible until the user leaves the popup
window AND the label area that displays it.

I'm hoping there was a really simple way to implement this that I
overlooked.

Thanks for those who can look at this.



[flexcoders] Re: FileReference.browse sometimes takes minutes for dialog to open

2008-03-11 Thread Todd
I've seen similar behavior on Windows when people have software added
that interacts with the Explorer directly, like the Gmail Drive Shell
Extension.  This class of software can be considered shell extensions.

Ironically, when I use Adobe Lightroom, it exhibits similar behavior
for me.  If I remember correctly, when the native browse windows comes
up, the Gmail extension prompts me to log into the drive.  But I
imagine any similar Shell extension could potentially cause the browse
dialog box to hang while Explorer resolves things.

There could be some quirks if the user had a cd/dvd in the drive, etc...

I know it's not a direct answer, but it could help you down the path
of discovery.

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

 I don't ever have this problem on my machine (MacBookPro, OSX), but my
 partner has it quite often on his (Dell laptop, WindowsXP):
 
 In our app, we call FileReference.browse for the user to select a
 local file. I've got a that call as basically the only code in the
 click event handler for a button. On my partner's machine, he clicks
 the button and sometimes has to wait a minute or more before the OS
 open dialog shows up.
 
 I'm not sure what I could be doing to affect the amount of time it
 takes for the OS dialog to show, and it may just be a quirk of his
 machine. Is there any way I can fix this, or if not, handle it
gracefully?
 
 Troy.





[flexcoders] Refactoring with Flex Builder 3

2008-03-06 Thread Todd
Am I the only one that has such huge problems with the rename
refactoring support in FB3?  Most of the time it leads to FB3 just
hanging on the dialog box with the finding references progress bar
stuck at 30%, and then when I press the cancel button nothing happens.  

I've always had this issue with it during the betas and now in the
release.  

Any one have any suggestions on troubleshooting this?  Or, does anyone
else find it as unreliable as I do to the point where I'm scared every
time I try it.  *whips up a voodoo spell*





[flexcoders] Re: MP3 web site

2008-03-06 Thread Todd
To add, if DRM is important to you, you should look into a commercial
product that does this.  Both Apple and MSFT are constantly thwarting
people's attacks at breaking the DRM, and unless you have a small
staff to manage all this...

So, some other ways of supporting some DRMd base solutions:

Adobe' Media Server:  http://www.adobe.com/products/flashmediaserver/
 (this isn't Mp3, but the process to convert MP3s is pretty
straightforward)

Microsoft's DRM (just a FAQ, but will let you know what you're getting
into): http://www.microsoft.com/windows/windowsmedia/forpros/drm/faq.aspx

You could also look at Apple's Quicktime AAC DRM stuff, though I'm not
really sure if Apple sells a product to create your own content with it.

I can only believe that any solution you come up with yourself will:
1) probably be easily subverted
2) potentially make something that should be a simple experience for
for your consumer a headache  -- it just takes one time of having a
false positive to piss your users.  Limiting to IP is probably a
mistake this day an age with people listening to MP3s on all thier
portable devices, etc.

As a consumer, if I download an MP3, I'm assuming I can play that
thing ANYWHERE.






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

 Hi,
 I am doing an web site for users to purchase speeches in the form of
mp3. 
 
 I want to make sure the user who bought the mp3 can only use it. I
 want to restrict the mp3 usage to only the downloading machine or some
 other kind of authentication before the user uses the file. Is there
 anyway to do it.
 
 One idea is don't allow the user to download the original file and
 play the file directly from internet (work like a subscription
 mechanism). Problem with this approach : the user always need internet
 connection, loading time for low bandwidth connections
 
 Any thoughts are much appreciated
 
 Thanks and Best Regards
 Ansar





[flexcoders] Re: Flex Builder 3: *major* bug in deleting linked folders

2008-03-05 Thread Todd
If you've got a really complex project, you're probably better off
creating a custom Ant Build for each debug and release.  Then you'll
have a lot more control of what happens with your builds and moving
files around, plus everything else that having an Ant Buildfile will
allow for, tagging versions, notifications, archiving prior builds, etc...

If you look up the Ant build stuff, you could probably get it running
in an hour or so.


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

 I am trying my best to not go to my blog and rant about Flex Builder
 3... but its getting harder by the hour. I had an earlier post about
 having to dig around and delete some hidden caches to get my code to
 compile correctly... and now, Flex Builder just hosed by entire
 website (well -- my localhost copy that I debug against).
 
 I'm pretty annoyed by the whole Export release build... change in
 Flex Builder 3 because I'm building a performance-intensive (i.e.
 game) Flash app and there's a noticeable difference between release
 and debug builds. As a result, I like to regularly check out the
 release build. Annoyingly, the release build doesn't get exported to
 the same spot as the debug build (which is into my web server's
 document root) so I was exporting it, then copying it by hand.
Annoying...
 
 So, I had the bright idea of setting the export... target folder to
 be by document root. I was warned that the export may get trampled by
 the debug build because they're in the same location. Fine with me,
 I'll rebuild the debug version after I check out the release build.
 
 Well, I did it, and sure enough, with automatic building it got
 confused and so I decided to undo it. I went into export release
 build... and changed the path back.
 
 Annoyingly, the linked directory for bin-release didn't update, so now
 I was stuck with a linked bin-release folder pointing at my document
 root. Okay, I'll just delete that linked folder... it won't delete the
 contents of the directory will it? Sure enough, my fears were allayed
 when FB warned, Deleting the linked folder will not remove the target
 folder just the link... OK? Hey, that's exactly what I want, so yeah,
 okay!
 
 F*CK! Even though the folder was definitely a linked folder (little
 icon and all), even though FB just told me it wasn't going to touch my
 file system, it deleted the contents of my document root. Zap.
 Instantly. And it didn't move it the trash like a decent human being,
 it just nuked it from the file system.
 
 Which leaves me to say, F* you Flex Builder... I shoulda just stayed
 in bed this morning, I'd be further along in my work than I am right
now.
 
 I know there's not any answers to a post like this... just a heads up,
 a warning, to be *very* careful when deleting linked folders because
 there's definitely something buggy happening there. It may be user
 error on my part, but I feel pretty safe yelling bug with the
 confirmation dialog that I got.
 
 At the very least, folks, let have all our apps that delete files from
 the file system go the extra mile and send them to the trash, m'kay?
 
 Troy.





[flexcoders] Re: FYI - iPhone won't support Mobile Flash

2008-03-05 Thread Todd
Maybe Adobe isn't kissing enough of Jobs' ass?  That's it, no
Photoshop CS4 for Apple!  (Just kidding, wouldn't want a riot to
start.).  



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

 In case someone was planning a project based on deploying it to the
iPhone:
 
  
 

http://gizmodo.com/364173/steve-jobs-craps-on-adobe-mobile-flash-does-not-bo
 de-well-for-iphone-support
 
  
 
 And all this time I though Jobs was a smart guy. 
 
  
 
 !k





[flexcoders] Re: Cairngorm and Menu Object

2008-03-05 Thread Todd
Yeah, this is where Cairngorm gets a little dicey in my eyes.  For
displaying popup windows, I call a command that does it's magic and
then sets a property on a model that's being watched and then calls a
function to display a PopUP Window.

I've read that some guys pass call-back functions coded into the view
into the command that the command calls back with the appropriate
data.  I've never personally done this as my watcher works pretty well.

It's a pain to set up, but once you go through the process once, you
are left with a tidy view, and all your code in a command.

Look up something called SimpleObserve, it's bascially a
ChangeWatcher, but it works well for watching model properties and
calling functions when the properties change.

There is a Cairngorm Flex list however, I think it's called 
Cairgngrom Docs on Yahoo groups here that might give you some better
feedback.



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

 Hi, I have a catesian chart that allows you to click on a single bar
 which will display a Menu object. Now inside my mxml that contains
 this chart there is an itemClick event and in there is where I create
 my menu and do a menu.show(). In order to build this menu there is
 several business logic involved depending on which bar was selected
 and so on...
 
 Is there any better approach to creating the Menu for instance in a
 Command class? Any feedback would be appreciated.





[flexcoders] Re: is there a way to watch variables live

2008-03-05 Thread Todd
There's a few tools I use:
1) for dynamic e4x at runtime, look up: Michael Labriola's E4x Parser.
 This allows dynamic runtime analysis of weird e4x debugging issues.

2)  FlexSpy, over at Google Code, allows for inspecting a lot of
properties of teh visual stuff live.  Also has a good filtering system.

3) a good logging framework that's controlled with trace levels.  I'm
using the Farata systems logger that cost about $100, but there's
others out there.

With these three tools, I find my need to do a lot of compilation,
debugs drastically reduced.

I'd love to see if someone has a tool for inspecting the Cairngorm
Model in an appllication with filtering and such. 


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

 Instead of doing breakpoints and what not, is there a way to see the
whole debug variable page live and see all the changes happening
during the application cycle or not.  I am entering text in a
Textinput and i would like to see the text change as i am doing that. 
 
 
  

 Be a better friend, newshound, and 
 know-it-all with Yahoo! Mobile.  Try it now. 
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ





[flexcoders] Re: Flex Builder 3 + Eclipse plugins vs. MyEclipse + FB3 plugin?

2008-03-04 Thread Todd
I'd definitely install FB3 as a plug-in.  I did this so I could
independently update the Flex 3 betas without having to retune my
environment.  For a bit, I had RadRails and MyEclipse, installed at
the same time, as well as tons of other tools.  


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

 Hi,
 
 I've been using MyEclipse + Flex Builder 2 plugin, as well as a bunch
 of other plugins (RadRails, Database Explorer, SVN, etc) for about 6
 months.
 
 The makers of MyEclipse tell me they don't officially support Flex
 Builder. So when I eventually upgrade to FB3, I'm considering
 installing the FB3 application by itself.
 
 Since FB3 is based on Eclipse, can I then recreate my existing
 development environment by installing the other plugins mentioned above?
 
 Thanks,
 
 Chris.





[flexcoders] Re: Question about SoapDecoder and Sequence XSD Schema Types

2008-03-04 Thread Todd
It's not the exact schema, but it does look just like it, especially
without the minoccurs and maxoccurs.

I've also tried setting the minoccurs=0 (but didn't set the maxoccurs)
with similar results.  Maybe need to set both minoccurs and maxoccurs?

I couldn't find anywhere in the XSD docs where it talks about the
default occurence attributes are either set, nor any docs telling me
what they default to.  Do you have a link?  What I have found are
little sentence blurbs at the W3C site, like this: 5.5 Default Values
-  An omitted accessor element implies either a default value or that
no value is known. The specifics depend on the accessor, method, and
its context. For example, an omitted accessor typically implies a Null
value for polymorphic accessors (with the exact meaning of Null
accessor-dependent). Likewise, an omitted Boolean accessor typically
implies either a False value or that no value is known, and an omitted
numeric accessor typically implies either that the value is zero or
that no value is known.

Reading this leads me to believe that not returning elements implies
that their values are just default/null.


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

 In your xsd there are no occurence attributes specified
 , so the elements have default occurrence attributes,
 
 minoccurs=1 and maxoccurs = 1
 
 In other words, they are always required once. Are you sure this is the
 exact
 schema which defines your response element?
 
 ~Peeyush
 
 On Tue, Mar 4, 2008 at 3:05 AM, Todd [EMAIL PROTECTED] wrote:
 
Hello,
  When I'm decoding a call to a Soap Service, I'm finding that if the
  soap response is missing a few elements, then the rest of the itmes
  don't get parsed from a sequence. Is this expected behavior?
 
  Say, I have a XSD element declared like so:
  complexType name=CommunicationType
  sequence
  element name=id type=long/
  element name=version type=int/
  element name=name type=string/
  element name=description type=string/
  element name=recordCount type=int/
  ...
  /sequence
  /complexType
 
  If the Soap Response looks similar to:
  Communication
xmlns:SOAP-ENV=http://schemas.xmlsoap.org/soap/envelope/;
  name
  EmailCommunicationTemplate
  /name
  description
  email communication template
  /description
  recordCount
  0
  /recordCount
  ...
  /Communcation
 
  I'm finding that all the properties on the Object returned to my
  result handler aren't populated with anything because as you see,
  there was no id, or version, returned from the Soap Response.
 
  However, in the Schema, these aren't declared required or anything.
  When I add an id into the Soap Response, then the object being
  returned will have a valid ID set, but nothing else. I'm assuming
  that the default SoapDecoder (XMLDecoder) maps properties up until the
  first one that is missing.
 
  Is flex Soap Services implying that for a Sequence type, every node
  must be returned, even if nil? Is this a standard? Any known work
  arounds? (I searched JIRA and just found a ton of things not related
  to me.)
 
  (I'm also getting tired of mapping XML off the wire to object by
hand.)
 
  Thanks,
  Todd
 
   
 





[flexcoders] Re: Question about SoapDecoder and Sequence XSD Schema Types

2008-03-04 Thread Todd
You very right about our server, it wasn't validating.

In our application we use Castor for O/X mapping. To generate WS
responses, domain objects are mapped to beans generated by Castor then
converted into XML. Castor internally has validation routine to
validate the instance against XSD which passed successfully.

We're thinking of moving to the validation facility offered by Spring
WS framework for validation. I think it would do a better job since it
will be validating XML/XSD instead of POJO/XSD.

Do you have any other suggestions for a better Java WebService stack
(open source)?

Thanks for the link to 2.2.1  (I had searched through the other
document on W3 and wasn't sure if the 2004 document, which was 4 years
after the 1.1., was valid for 1.1).

This is exactly what I needed.  Thanks a bunch.  I feel we're on the
right track.

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

 http://www.w3.org/TR/xmlschema-0/
 
 read section 2.2.1 .
 
 Even if you declare a default attribute for an element, you need to
return
 it to
 set its content node to the default value.
 
 This might be off the scope of this list but what I fail to
understand is
 that when you have defined your
 message type in an XSD and if your webservice code is bound to it for
 validation,
 then how is it able to send a soap response which would violate the
message
 structure.
 
 
 Can you let me know the server - side language?
 
 ~Peeyush
 
 
 On Tue, Mar 4, 2008 at 7:13 PM, Todd [EMAIL PROTECTED] wrote:
 
It's not the exact schema, but it does look just like it, especially
  without the minoccurs and maxoccurs.
 
  I've also tried setting the minoccurs=0 (but didn't set the maxoccurs)
  with similar results. Maybe need to set both minoccurs and maxoccurs?
 
  I couldn't find anywhere in the XSD docs where it talks about the
  default occurence attributes are either set, nor any docs telling me
  what they default to. Do you have a link? What I have found are
  little sentence blurbs at the W3C site, like this: 5.5 Default Values
  - An omitted accessor element implies either a default value or that
  no value is known. The specifics depend on the accessor, method, and
  its context. For example, an omitted accessor typically implies a Null
  value for polymorphic accessors (with the exact meaning of Null
  accessor-dependent). Likewise, an omitted Boolean accessor typically
  implies either a False value or that no value is known, and an omitted
  numeric accessor typically implies either that the value is zero or
  that no value is known.
 
  Reading this leads me to believe that not returning elements implies
  that their values are just default/null.
 
 
  --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com,
Peeyush
  Tuli peeyush81@ wrote:
  
   In your xsd there are no occurence attributes specified
   , so the elements have default occurrence attributes,
  
   minoccurs=1 and maxoccurs = 1
  
   In other words, they are always required once. Are you sure this
is the
   exact
   schema which defines your response element?
  
   ~Peeyush
  
   On Tue, Mar 4, 2008 at 3:05 AM, Todd tprekaski@ wrote:
  
Hello,
When I'm decoding a call to a Soap Service, I'm finding that
if the
soap response is missing a few elements, then the rest of the
itmes
don't get parsed from a sequence. Is this expected behavior?
   
Say, I have a XSD element declared like so:
complexType name=CommunicationType
sequence
element name=id type=long/
element name=version type=int/
element name=name type=string/
element name=description type=string/
element name=recordCount type=int/
...
/sequence
/complexType
   
If the Soap Response looks similar to:
Communication
  xmlns:SOAP-ENV=http://schemas.xmlsoap.org/soap/envelope/;
name
EmailCommunicationTemplate
/name
description
email communication template
/description
recordCount
0
/recordCount
...
/Communcation
   
I'm finding that all the properties on the Object returned to my
result handler aren't populated with anything because as you see,
there was no id, or version, returned from the Soap Response.
   
However, in the Schema, these aren't declared required or
anything.
When I add an id into the Soap Response, then the object being
returned will have a valid ID set, but nothing else. I'm assuming
that the default SoapDecoder (XMLDecoder) maps properties up
until the
first one that is missing.
   
Is flex Soap Services implying that for a Sequence type, every
node
must be returned, even if nil? Is this a standard? Any known work
arounds? (I searched JIRA and just found a ton of things not
related
to me.)
   
(I'm also getting tired of mapping XML off the wire to object by
  hand.)
   
Thanks,
Todd
   
   
   
  
 
   
 





[flexcoders] Re: Question about SoapDecoder and Sequence XSD Schema Types

2008-03-04 Thread Todd
FYI, just to clarify, it seems that Castor was failing at XML validation.


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

 You very right about our server, it wasn't validating.
 
 In our application we use Castor for O/X mapping. To generate WS
 responses, domain objects are mapped to beans generated by Castor then
 converted into XML. Castor internally has validation routine to
 validate the instance against XSD which passed successfully.
 
 We're thinking of moving to the validation facility offered by Spring
 WS framework for validation. I think it would do a better job since it
 will be validating XML/XSD instead of POJO/XSD.
 
 Do you have any other suggestions for a better Java WebService stack
 (open source)?
 
 Thanks for the link to 2.2.1  (I had searched through the other
 document on W3 and wasn't sure if the 2004 document, which was 4 years
 after the 1.1., was valid for 1.1).
 
 This is exactly what I needed.  Thanks a bunch.  I feel we're on the
 right track.
 
 --- In flexcoders@yahoogroups.com, Peeyush Tuli peeyush81@ wrote:
 
  http://www.w3.org/TR/xmlschema-0/
  
  read section 2.2.1 .
  
  Even if you declare a default attribute for an element, you need to
 return
  it to
  set its content node to the default value.
  
  This might be off the scope of this list but what I fail to
 understand is
  that when you have defined your
  message type in an XSD and if your webservice code is bound to it for
  validation,
  then how is it able to send a soap response which would violate the
 message
  structure.
  
  
  Can you let me know the server - side language?
  
  ~Peeyush
  
  
  On Tue, Mar 4, 2008 at 7:13 PM, Todd tprekaski@ wrote:
  
 It's not the exact schema, but it does look just like it,
especially
   without the minoccurs and maxoccurs.
  
   I've also tried setting the minoccurs=0 (but didn't set the
maxoccurs)
   with similar results. Maybe need to set both minoccurs and
maxoccurs?
  
   I couldn't find anywhere in the XSD docs where it talks about the
   default occurence attributes are either set, nor any docs telling me
   what they default to. Do you have a link? What I have found are
   little sentence blurbs at the W3C site, like this: 5.5 Default
Values
   - An omitted accessor element implies either a default value or that
   no value is known. The specifics depend on the accessor, method, and
   its context. For example, an omitted accessor typically implies
a Null
   value for polymorphic accessors (with the exact meaning of Null
   accessor-dependent). Likewise, an omitted Boolean accessor typically
   implies either a False value or that no value is known, and an
omitted
   numeric accessor typically implies either that the value is zero or
   that no value is known.
  
   Reading this leads me to believe that not returning elements implies
   that their values are just default/null.
  
  
   --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com,
 Peeyush
   Tuli peeyush81@ wrote:
   
In your xsd there are no occurence attributes specified
, so the elements have default occurrence attributes,
   
minoccurs=1 and maxoccurs = 1
   
In other words, they are always required once. Are you sure this
 is the
exact
schema which defines your response element?
   
~Peeyush
   
On Tue, Mar 4, 2008 at 3:05 AM, Todd tprekaski@ wrote:
   
 Hello,
 When I'm decoding a call to a Soap Service, I'm finding that
 if the
 soap response is missing a few elements, then the rest of the
 itmes
 don't get parsed from a sequence. Is this expected behavior?

 Say, I have a XSD element declared like so:
 complexType name=CommunicationType
 sequence
 element name=id type=long/
 element name=version type=int/
 element name=name type=string/
 element name=description type=string/
 element name=recordCount type=int/
 ...
 /sequence
 /complexType

 If the Soap Response looks similar to:
 Communication
   xmlns:SOAP-ENV=http://schemas.xmlsoap.org/soap/envelope/;
 name
 EmailCommunicationTemplate
 /name
 description
 email communication template
 /description
 recordCount
 0
 /recordCount
 ...
 /Communcation

 I'm finding that all the properties on the Object returned to my
 result handler aren't populated with anything because as you
see,
 there was no id, or version, returned from the Soap Response.

 However, in the Schema, these aren't declared required or
 anything.
 When I add an id into the Soap Response, then the object being
 returned will have a valid ID set, but nothing else. I'm
assuming
 that the default SoapDecoder (XMLDecoder) maps properties up
 until the
 first one that is missing.

 Is flex Soap Services implying that for a Sequence type, every
 node
 must be returned, even if nil? Is this a standard? Any known
work
 arounds? (I searched JIRA

[flexcoders] Re: Air Installation Error

2008-03-04 Thread Todd
You can't change the certificate used to sign an app.  It'll have to
be treated as a different application. This is listed somewhere in the
docs, and is covered in my article up at Adobe DevNet on codsigning
your air applications.

But, going forward, you'll be able to use the update functionality of
AIR with your newly signed application.  

The user should just uninstall the old one and install the new version
of the application.


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

 We are running into this issue with our air app installation.
 
 Our users have installed the AIR app built on beta3. We had a self
 signed certificate at that time. Now, we moved to Air and Flex 3 and
 have a signed certificate. We released our new app compiled with AIR 3.
 
 But when the install badge is run, the user gets an error saying
 
 'Sorry, an error has occurred
 The application could not be installed because an application with
 that name already exists at the selected installation location. Try
 installing to a different location.'
 
 
 The user has to manually uninstall the existing application which is
 not desirable.
 
 Is it possible to have the installation seamless. Like uninstall the
 existing app and install the AIR 3 app automatically? We did not have
 this issue migrating from beta 2 to beta 3.  
 
 Anyone know why error occurs? This is a high priority issue for us
 right now. Any help is greatly appreciated.
 
 - venkat





[flexcoders] Re: AIR QnA

2008-03-04 Thread Todd
Personally, I'd rather see AIR thought of as a cross-platform Desktop
application platform (like Visual Basic), than a method being marketed
at web-developers building desktop apps (initial Adobe marketing,
though it seems to be changing a bit, AIR can be so much more, ya
know).  When users install applications, they're generally aware that
they could be doing evil things.  When I download Adobe Lightroom, I
know that I'm INSTALLING an application.  Instead we have AIR that
walks that fine line of not being a desktop app because of one-click
web install, and developers are left looking elsewhere for desktop
application development -- unless the limited functionality of AIR
suits your specific needs, and it is just fine for some applications.
 
Anyway, I'm hoping all that native C/C++ to Actionscript compiler
stuff that Ted talked about on his blog
(http://www.onflex.org/ted/2008/02/extending-adobe-flash-player-and-adobe.php),
and has been discussed elsewhere comes to fruitation.  Because having
C/C++ compiled into Actionscript SWF execution could alleviate a lot
of running of external programs, like fancy PDF generation, accessing
Subversion, etc...  (Yeah, I know someone could technically write a
library in Actionscript to access Subversion, but so many exist
already, and if I were writing some sort of tool, I'd probably try to
use the command-line SVN client with some form of wrapper..)

Then again, I imagine that AIR eventually will expand into being a
desktop development environment, with access to external libs and
executables, etc.  

While I think the Merapi is great and cool idea (and may well be the
only way to power-up AIR, I'm still not in heaven having the Java
runtime installed.   Couldn't they do something similar with a
lighterweight runtime platform (Lua, at only 500k? I don't really
know, just throwing out the question -- I've personally tinkered with
Python and CherryPy doing something similar). If I wanted to go the
route of relying on Java, I'd probably just use TrollTech's QT's Jambi
for cross-platform application development.  (Though, I'd rather use
MXML and Actionscript for most of my front-end needs.)  Anyway, not to
knock the process behind Merapi, as anything will be quite welcome.

OK, sorry to ramble.

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

 Well considering the consequences of offering fully web-based push
button
 installs as well as access to executing local processes, which might
be a
 case of having your cake and eating it too.
 
  
 
 Though I hope a method of dealing with this in a secure fashion pops up,
 I'll make due without if need be simply to ensure my clients are safe to
 install the runtime without Norton throwing a fit.
 
  
 
 !k
 
  
 
   _  
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of Dan Rolander
 Sent: Tuesday, March 04, 2008 10:40 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: AIR QnA
 
  
 
 I really hope the Merapi project takes off. For me, the inability of 
 Air applications to launch external processes is a huge disappointment 
 and limits what I can do with it.





[flexcoders] Re: AIR QnA

2008-03-04 Thread Todd
Also, another thing to think about is that if there is an excellent
proxy technology that is developed like Merapi (or my idealistic 200K
cross-platform proxy), we can always make our own custom installations
(DMG for OSX, MSI for Windows) and use silent install on AIR to
install like a proper native application.  Your users download an
application from the web like they do now, and run the installation.
  The thinking is that when you launch your AIR application, you
launch a different executable that has full OS permissions, and that
starts the shim-proxy, then starts the AIR application.  Granted each
of these launchers will have to be written for each OS, but they
should be pretty straightforward.

--Todd




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

 Personally, I'd rather see AIR thought of as a cross-platform Desktop
 application platform (like Visual Basic), than a method being marketed
 at web-developers building desktop apps (initial Adobe marketing,
 though it seems to be changing a bit, AIR can be so much more, ya
 know).  When users install applications, they're generally aware that
 they could be doing evil things.  When I download Adobe Lightroom, I
 know that I'm INSTALLING an application.  Instead we have AIR that
 walks that fine line of not being a desktop app because of one-click
 web install, and developers are left looking elsewhere for desktop
 application development -- unless the limited functionality of AIR
 suits your specific needs, and it is just fine for some applications.
  
 Anyway, I'm hoping all that native C/C++ to Actionscript compiler
 stuff that Ted talked about on his blog

(http://www.onflex.org/ted/2008/02/extending-adobe-flash-player-and-adobe.php),
 and has been discussed elsewhere comes to fruitation.  Because having
 C/C++ compiled into Actionscript SWF execution could alleviate a lot
 of running of external programs, like fancy PDF generation, accessing
 Subversion, etc...  (Yeah, I know someone could technically write a
 library in Actionscript to access Subversion, but so many exist
 already, and if I were writing some sort of tool, I'd probably try to
 use the command-line SVN client with some form of wrapper..)
 
 Then again, I imagine that AIR eventually will expand into being a
 desktop development environment, with access to external libs and
 executables, etc.  
 
 While I think the Merapi is great and cool idea (and may well be the
 only way to power-up AIR, I'm still not in heaven having the Java
 runtime installed.   Couldn't they do something similar with a
 lighterweight runtime platform (Lua, at only 500k? I don't really
 know, just throwing out the question -- I've personally tinkered with
 Python and CherryPy doing something similar). If I wanted to go the
 route of relying on Java, I'd probably just use TrollTech's QT's Jambi
 for cross-platform application development.  (Though, I'd rather use
 MXML and Actionscript for most of my front-end needs.)  Anyway, not to
 knock the process behind Merapi, as anything will be quite welcome.
 
 OK, sorry to ramble.
 
 --- In flexcoders@yahoogroups.com, Kevin Aebig kevin@ wrote:
 
  Well considering the consequences of offering fully web-based push
 button
  installs as well as access to executing local processes, which might
 be a
  case of having your cake and eating it too.
  
   
  
  Though I hope a method of dealing with this in a secure fashion
pops up,
  I'll make due without if need be simply to ensure my clients are
safe to
  install the runtime without Norton throwing a fit.
  
   
  
  !k
  
   
  
_  
  
  From: flexcoders@yahoogroups.com
[mailto:[EMAIL PROTECTED] On
  Behalf Of Dan Rolander
  Sent: Tuesday, March 04, 2008 10:40 AM
  To: flexcoders@yahoogroups.com
  Subject: [flexcoders] Re: AIR QnA
  
   
  
  I really hope the Merapi project takes off. For me, the inability of 
  Air applications to launch external processes is a huge
disappointment 
  and limits what I can do with it.
 





[flexcoders] What's the best way to debug SchemaTypeRegistry mishaps

2008-03-03 Thread Todd
Hello All,
  I'm using the new Flex 3 ShchemaTypeRegistry to map my XSD Schema
types returned in Soap Results with value objects on my application
side of things.
I have application tracing set to 0, so I can see the SoapResult
coming off the wire.  But for the rest of the logging information from
the framework, all I see is:
Decoding SOAP response
Encoded SOAP response SOAP-ENV:Envelope ...[truncated by me for posting]
Decoding SOAP response envelope
Decoding SOAP response headers
Decoding SOAP response body
Decoded SOAP response into result [2 millis]

What are some techniques you guys use to debug when things go wrong
with SchemaType mapping?

Right now, all I see in the result is that my data.result is of the
proper type, but all the properties are set to their default values. 
I'm assuming something didn't map well with the TypeRegistry.properly.

My VOs have a few levels of Objects, i.e.,
Customer.customerOrders.lineItems.
Thanks.



[flexcoders] Re: What's the best way to debug SchemaTypeRegistry mishaps

2008-03-03 Thread Todd
Ok, I guess what I've done for now was open some of the Framework
classes, like SOAPDecoder.as and XMLDecoder.as, and place some
strategic breakpoints.  It would be nice to have a little more tracing
inside these.  I guess I can look into figuring out how to build some
of the framework swc, like the rpc stuff that I'm currently using.

I think I found my problem in XMLDecoder::decodeSequence and
XMLDecoder::decodeGroupElement.  Does anyone know that when an WSDL
element is defined as a Sequence, if flex needs every element to be
present to decode it properly?  (I'm aware that they all should be in
the proper order...but I'm not aware that the server response should
be returning a lot of null items for values that aren't being returned.)

Thanks.




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




 Hello All,
   I'm using the new Flex 3 ShchemaTypeRegistry to map my XSD Schema
 types returned in Soap Results with value objects on my application
 side of things.
 I have application tracing set to 0, so I can see the SoapResult
 coming off the wire.  But for the rest of the logging information from
 the framework, all I see is:
 Decoding SOAP response
 Encoded SOAP response SOAP-ENV:Envelope ...[truncated by me for
posting]
 Decoding SOAP response envelope
 Decoding SOAP response headers
 Decoding SOAP response body
 Decoded SOAP response into result [2 millis]
 
 What are some techniques you guys use to debug when things go wrong
 with SchemaType mapping?
 
 Right now, all I see in the result is that my data.result is of the
 proper type, but all the properties are set to their default values. 
 I'm assuming something didn't map well with the TypeRegistry.properly.
 
 My VOs have a few levels of Objects, i.e.,
 Customer.customerOrders.lineItems.
 Thanks.





[flexcoders] Re: What's the best way to debug SchemaTypeRegistry mishaps

2008-03-03 Thread Todd
Feel free to ignore this.  I'm writing a new question with more specifics.

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

 Ok, I guess what I've done for now was open some of the Framework
 classes, like SOAPDecoder.as and XMLDecoder.as, and place some
 strategic breakpoints.  It would be nice to have a little more tracing
 inside these.  I guess I can look into figuring out how to build some
 of the framework swc, like the rpc stuff that I'm currently using.
 
 I think I found my problem in XMLDecoder::decodeSequence and
 XMLDecoder::decodeGroupElement.  Does anyone know that when an WSDL
 element is defined as a Sequence, if flex needs every element to be
 present to decode it properly?  (I'm aware that they all should be in
 the proper order...but I'm not aware that the server response should
 be returning a lot of null items for values that aren't being returned.)
 
 Thanks.
 
 
 
 
 --- In flexcoders@yahoogroups.com, Todd tprekaski@ wrote:
 
 
 
 
  Hello All,
I'm using the new Flex 3 ShchemaTypeRegistry to map my XSD Schema
  types returned in Soap Results with value objects on my application
  side of things.
  I have application tracing set to 0, so I can see the SoapResult
  coming off the wire.  But for the rest of the logging information from
  the framework, all I see is:
  Decoding SOAP response
  Encoded SOAP response SOAP-ENV:Envelope ...[truncated by me for
 posting]
  Decoding SOAP response envelope
  Decoding SOAP response headers
  Decoding SOAP response body
  Decoded SOAP response into result [2 millis]
  
  What are some techniques you guys use to debug when things go wrong
  with SchemaType mapping?
  
  Right now, all I see in the result is that my data.result is of the
  proper type, but all the properties are set to their default values. 
  I'm assuming something didn't map well with the TypeRegistry.properly.
  
  My VOs have a few levels of Objects, i.e.,
  Customer.customerOrders.lineItems.
  Thanks.
 





[flexcoders] Question about SoapDecoder and Sequence XSD Schema Types

2008-03-03 Thread Todd
Hello,
  When I'm decoding a call to a Soap Service, I'm finding that if the
soap response is missing a few elements, then the rest of the itmes
don't get parsed from a sequence.  Is this expected behavior?

Say, I have a XSD element declared like so:
complexType name=CommunicationType
  sequence
element name=id type=long/
element name=version type=int/
element name=name type=string/
element name=description type=string/
element name=recordCount type=int/
...
   /sequence
/complexType

If the Soap Response looks similar to: 
Communication xmlns:SOAP-ENV=http://schemas.xmlsoap.org/soap/envelope/;
  name
EmailCommunicationTemplate
  /name
  description
email communication template
  /description
  recordCount
0
  /recordCount
  ...
/Communcation

I'm finding that all the properties on the Object returned to my
result handler aren't populated with anything because as you see,
there was no id, or version, returned from the Soap Response.  

However, in the Schema, these aren't declared required or anything. 
When I add an id into the Soap Response, then the object being
returned will have a valid ID set, but nothing else.  I'm assuming
that the default SoapDecoder (XMLDecoder) maps properties up until the
first one that is missing.  

Is flex Soap Services implying that for a Sequence type, every node
must be returned, even if nil?  Is this a standard?  Any known work
arounds?  (I searched JIRA and just found a ton of things not related
to me.) 

(I'm also getting tired of mapping XML off the wire to object by hand.)

Thanks,
Todd



[flexcoders] Re: Why upgrade to FB3?

2008-02-15 Thread Todd
You could be right, I don't remember the exact pricing and what came
with what, I only remember the charting components came in teh pro
version.. the more expensive one was like only $500, $700 or so.  (I
don't remember the exact prices, I just know they seem quite reasonable)


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

 Isn't the profiler only going to be available in the more expensive
 version? e.g. the one that costs a fair bit more than $250?
 This is from memory (at home time on a Friday) I've not checked it ...
  
 -Original Message-
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of Todd
 Sent: 15 February 2008 17:31
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: Why upgrade to FB3?
  
 For the basic version of $250 bucks, for me it's a no brainer:
 
 If you're using WebServices, then I'd upgrade, even if it's only to
 look at the code that the WSDL Import tool generates. This code is
 the best documentation I've found about Flex/Web Services. But you're
 not using Web Services. Scratch that.
 
 Compilation times. So much faster, though this is probably more due
 to SDK, but who knows. I know is that you wont be using Flex3 SDK
 with FB2. (Someone correct me if I'm wrong on this, just assuming
 since one of the features of FB3 is targeting multiple SDKs). This
 alone is probably worth the aggravation of the upgrade.
 
 The Profiler. You're developing naked, in Antartica, while
 hallucinating, and being chased by polar bears without it. It brings
 Flex development into the real world as far as I'm concerned - at
 least for developing complex applications.
 
 At $250 bucks, it only needs to save a few hours of work to make
 itself pay for itself. One nasty memory leak bug...vioala.
 
 --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
 , Mr Greg Murnock gmurnock@ wrote:
 
  For the big discussion of the day/week...
  
  I have been given the task to give a strong case on why we need to
 spend the money (proposed pricing schedule) on the upgrade to FB3,
 when available. 
  Our company does not look to do AIR apps, we do not have a case to
 use Advanced Datagrid, we front CF7 with an Oracle DB (irrelevant) so
 the FDS is already there. Current F2 apps with charting working great.
  
  I want to upgrade but need more of a reason, for my [EMAIL PROTECTED] 
  company -
 did I say that outloud, for us to purchase the upgrades. All comments
 are accepted. :)
  
  Greg
  
  
  
 __
  Be a better friend, newshound, and 
  know-it-all with Yahoo! Mobile. Try it now. 
 http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
 http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ 
 
  
 
 __
 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.
 __





[flexcoders] Web Services and Queueing SOAP Operations..

2008-02-15 Thread Todd
Hello All,
  I have some SOAP operations that I think point at endpoints that
don't exist or are down.  I have a lot of debugging information turned
on and I'm seeing some messages like:
Queueing SOAP operation GetTheDataDude

I never receive an error in the client.

Is there a way to determine whether the service is active?  Or a way
to keep these types of things from being swallowed by the Web Services
API?  is this jsut a behavior of the debug Flash Player?

Any insights to the mythical world of Web Services and Flex would be
greatly appreciated.

--Todd



[flexcoders] Re: Why upgrade to FB3?

2008-02-15 Thread Todd
For the basic version of $250 bucks, for me it's a no brainer:

If you're using WebServices, then I'd upgrade, even if it's only to
look at the code that the WSDL Import tool generates.  This code is
the best documentation I've found about Flex/Web Services.  But you're
not using Web Services.  Scratch that.

Compilation times.  So much faster, though this is probably more due
to SDK, but who knows.  I know is that you wont be using Flex3 SDK
with FB2.  (Someone correct me if I'm wrong on this, just assuming
since one of the features of FB3 is targeting multiple SDKs).  This
alone is probably worth the aggravation of the upgrade.

The Profiler.  You're developing naked, in Antartica, while
hallucinating, and being chased by polar bears without it.  It brings
Flex development into the real world as far as I'm concerned - at
least for developing complex applications.

At $250 bucks, it only needs to save a few hours of work to make
itself pay for itself.  One nasty memory leak bug...vioala.


--- In flexcoders@yahoogroups.com, Mr Greg Murnock [EMAIL PROTECTED] wrote:

 For the big discussion of the day/week...
 
 I have been given the task to give a strong case on why we need to
spend the money (proposed pricing schedule) on the upgrade to FB3,
when available.  
 Our company does not look to do AIR apps, we do not have a case to
use Advanced Datagrid, we front CF7 with an Oracle DB (irrelevant) so
the FDS is already there.  Current F2 apps with charting working great.
 
 I want to upgrade but need more of a reason, for my [EMAIL PROTECTED] company 
 -
did I say that outloud, for us to purchase the upgrades.  All comments
are accepted. :)
 
 Greg
 
 
  

 Be a better friend, newshound, and 
 know-it-all with Yahoo! Mobile.  Try it now. 
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ





[flexcoders] Anyway to introspect a Module for a list of Classes?

2008-02-14 Thread Todd
Hello All,
  I'm trying to figure out the Flex reflection APIs and their
limitations.  I'm looking for a way to get all the Classes in a
Module, or even the main SWF of a given type.  Is there a way to do this?

I've looked at the flash.util:
getDefenition, 
describeType,
getQualifiedClassNae,
getQualifiedSuperclassName
etc.
But I dont' see anything useful.

For example, I want to take a SWF and get all classes that extend
MyBaseClass...

Thanks,
Todd




[flexcoders] Re: Anyway to introspect a Module for a list of Classes?

2008-02-14 Thread Todd
OK, i went and voted for it.  I'm surprised this isn't in there.

Thanks guys, now I'll stop trying to find an answer!

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

 There is no way to reflect packages in an app/module or classes in a
 package.  This is an important missing piece in Flex.  Please vote
for this
 request...
 
 https://bugs.adobe.com/jira/browse/SDK-14654
 
 And I'm sure someone wants to point out that this is really a player
feature
 not a Flex feature, but the Flex compiler can fake it pretty easily.
 
 Sam
 
 
 On Thu, Feb 14, 2008 at 8:54 AM, Todd [EMAIL PROTECTED] wrote:
 
  Hello All,
   I'm trying to figure out the Flex reflection APIs and their
  limitations.  I'm looking for a way to get all the Classes in a
  Module, or even the main SWF of a given type.  Is there a way to
do this?
 
  I've looked at the flash.util:
 getDefenition,
 describeType,
 getQualifiedClassNae,
 getQualifiedSuperclassName
 etc.
  But I dont' see anything useful.
 
  For example, I want to take a SWF and get all classes that extend
  MyBaseClass...
 
  Thanks,
  Todd
 





[flexcoders] Re: Question on using RPC WebService Call

2008-02-07 Thread Todd
For more details on what's happening, I hope I don't confuse the
situation with too much data here:

I have a delegate that has a method called GetData and GetData2:

public function GetData():void
{  
  var token:AsyncToken = ws.GetData();
  token.addResponder(this.responder);
}

public function GetData(nodeId:Object = null):void
{  
  var token:AsyncToken = ws.GetData(nodeId);
  token.addResponder(this.responder);
}

I've declared a WebService in Both MXML and in Actionscript:
WebServiceRPC
WebServiceMXML

I then call every combination of the two methods:
WebServiceRPC-GetData (Doesn't even call to the server, doesn't fail.
 I suspect something is happening in the SOAPEncoder, though it's not
throwing errors, just silently dying.  I'm hoping to figure out
why/how to get it to throw errors.  Its silence is disturbing.)

WebServiceMXML-GetData works just fine. 

WebServiceRPC-GetData2(null) - SoapFault is raised because the server
doesn't recognize the request. 

WebServiceRPC-GetData2(1) - Returns expected Soap Envelope from the
Server

WebServiceMXML-GetData2(null) - Returns proper SoapFault, just like
with WebServiceRPC call above.

WebServiceRPC-GetData2(1) - Returns expected Soap Envelope from the
Server , just like WebServiceRPC call above

I'm trying to figure out how to call the WebServiceRPC-GetData so it
doesn't break (it's not throwing a fault), like it doesn't with the
WebServiceMXML.  I guess I'm looking for a strategy for passing
optional parameters from Flex up to WebServices declared in
Actionscript code (RPC).

Here's the WSDL defenition of GetData, as you can see it has both min
and maxOccurs set:
element name=GetData
annotation
documentation
Blah
/documentation
/annotation
complexType
sequence
element maxOccurs=1 minOccurs=0 
name=nodeId type=long
/element
/sequence
/complexType
/element



[flexcoders] Question on using RPC WebService Call

2008-02-07 Thread Todd
Hello I have 2 Questions

1)  I notice that when using mx.rpc.soap.WebService (instead of
mx.rpc.soap.mxml.WebService) that there's no property resultFormat. 
Is there a way for my RPC-based WebService to return e4x? Or, do I
manually do the conversion

2)  When using the mxml.WebService, do I have to declare all the
Operations and Requests?  It seems with the rpc-based Webservice, it
can dynamically inspect the WebService.

The reason I'm asking is that I'm having difficulties passing an
optional parameter through the WebService.  When using MXML--based
WebService, with Operations declared in MXML, the SoapEncoder creates
a proper request when omitting that optional parameter.  However, the
rpc-WebService blows up, never returning, with the SoapEncoder
swallowing the error.

I'm also asking because we have a lot of web services with a lot of
calls that we're integrating, and WSDL import tool doesn't work for
us...and we have a lot of WebServices and operations we're bringing
into the application, further compounded by the fact that the
WebServices are constantly changing through the development environment.

Thanks for any insight.



[flexcoders] Re: Question on using RPC WebService Call

2008-02-07 Thread Todd
In regards to my first part, I'm aware that I can cast from ObjectUtil
 to XMLList, I guess I'm more curious on the differences in
implementation between rpc and mxml-based WebService.

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

 Hello I have 2 Questions
 
 1)  I notice that when using mx.rpc.soap.WebService (instead of
 mx.rpc.soap.mxml.WebService) that there's no property resultFormat. 
 Is there a way for my RPC-based WebService to return e4x? Or, do I
 manually do the conversion
 
 2)  When using the mxml.WebService, do I have to declare all the
 Operations and Requests?  It seems with the rpc-based Webservice, it
 can dynamically inspect the WebService.
 
 The reason I'm asking is that I'm having difficulties passing an
 optional parameter through the WebService.  When using MXML--based
 WebService, with Operations declared in MXML, the SoapEncoder creates
 a proper request when omitting that optional parameter.  However, the
 rpc-WebService blows up, never returning, with the SoapEncoder
 swallowing the error.
 
 I'm also asking because we have a lot of web services with a lot of
 calls that we're integrating, and WSDL import tool doesn't work for
 us...and we have a lot of WebServices and operations we're bringing
 into the application, further compounded by the fact that the
 WebServices are constantly changing through the development environment.
 
 Thanks for any insight.





[flexcoders] Re: Flex+XFire+Spring

2008-02-06 Thread Todd
We're using Spring and some-random-tool providing our webservices from
a SQL Server 2005 Database.  

There's not a whole lot on the Flex side for you to configure assuming
your back-end will WebSErvice 1.1 compliant.  If you're lucky, the new
import WSDL tools in Flex Builder 3 will help generate the client side
Flex proxies.  If you're unlucky, and the import wsdl doesn't support
your schema (look at the bug database), then you'll end up coding a
lot of the binding from the wire into your application.  And if you're
 building a big application, you'll probably end up creating
client-side VOs and bind them to the XML off the wire, etc. and then
up trying to do some of your own code generation.
 
Then there's some decisions you'll have to make about authentication
on the server-side.  In our application, we're authenticating and and
storing session information on the http side of things, and then if
you're authenticated, you can get at your webservices..

But all in all, once you learn WebServices -- apart from Flex, Flex
makes it pretty easy to call them.

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

 
 HI all,
 
 I am working on a application which uses spring as the backend..We are
 exploring to use XFire as webservices and Oracle as the database.
 Does anyone has documentation for configuring Flex,Xfire and Spring
 I have browsed online but could not get sufficient info..If anyone has
 it please post it..
 
 Thanks,





[flexcoders] Re: What's your strategy for handling Errors in WebService.as and WSDL.as?

2008-01-31 Thread Todd
I've seemed to fix a lot of my problems, simple by declaring my own
WebService, instead of useing the mxml version of WebService.  I.e.
use mx.rpc.soap.WebService NOT mx.rpc.soap.mxml.WebService (declared
in MXML).
  I'm even doing this in Cairngorm now, no more MXML declarations, but
instead using the Cairngorm ServiceLocator Layer and generating my own
Service Factories.
  There's also the side benefit of not having to declare all my
operations in MXML.  

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

 On Wednesday 30 Jan 2008, Todd wrote:
  OK, that I can see.  So then will my default FaultHandler be fired
  then when the debug player isn't being used?
 
 No, it'll be silently swallowed.
 I'm not sure if try/catch will help or not.
 
  BTW, I may be having bigger issues with my WSDL and service
  defenitions using namespaces on teh nodes
 
 Handerling XML in ActionScript when it uses namespaces seems to be a
pain, 
 yeah.
 
 -- 
 Tom Chiverton
 Helping to proactively visualize exceptional niches
 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 Halliwells LLP, 3 Hardman Square, Spinningfields,
Manchester, M3 3EB.  A list of members is available for inspection at
the registered office. Any reference to a partner in relation to
Halliwells LLP means a member of Halliwells LLP.  Regulated by The
Solicitors Regulation Authority.
 
 CONFIDENTIALITY
 
 This email is intended only for the use of the addressee named above
and may be confidential or legally privileged.  If you are not the
addressee you must not read it and must not use any information
contained in nor copy it nor inform any person other than Halliwells
LLP or the addressee of its existence or contents.  If you have
received this email in error please delete it and notify Halliwells
LLP IT Department on 0870 365 2500.
 
 For more information about Halliwells LLP visit www.halliwells.com.





[flexcoders] What's your strategy for handling Errors in WebService.as and WSDL.as?

2008-01-30 Thread Todd
Is there a way to underride the default functionality of
WebService.as?  I can't find the source code in the SDK, so I'm
assuming this part of Flex isn't Open Source.

I find that using WebServices that there are a lot of errors that
potentially occur that I can't capture in the UI.  Or, let me rephrase
that, that I haven't been able to figure out how to capture in the UI.

For example, the following Could not load WSDL error occurs.  Now, I
could probably devise a strategy around checking that the connection
is alive and such, but then I've seen other errors that occur in the
WebService base classes that are all fired asyncronously.

Is there a way to add a default handler that capures these types of
errors?  (They're not captures by FaultHandlers).

I can't have a UI that displays the big white box to end users with a
stack trace.  Thanks.

[RPC Fault faultString=Could not load WSDL
faultCode=Server.NoServicesInWSDL faultDetail=No wsdl:service
elements found in WSDL at .]
at
mx.rpc.wsdl::WSDL/getService()[E:\dev\flex_3_beta3\sdk\frameworks\projects\rpc\src\mx\rpc\wsdl\WSDL.as:256]
at
mx.rpc.wsdl::WSDL/getPort()[E:\dev\flex_3_beta3\sdk\frameworks\projects\rpc\src\mx\rpc\wsdl\WSDL.as:182]
at
mx.rpc.soap::WebService/http://www.adobe.com/2006/flex/mx/internal::wsdlHandler()[E:\dev\flex_3_beta3\sdk\frameworks\projects\rpc\src\mx\rpc\soap\WebService.as:267]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at
mx.rpc.wsdl::WSDLLoader/checkLoadsOutstanding()[E:\dev\flex_3_beta3\sdk\frameworks\projects\rpc\src\mx\rpc\wsdl\WSDLLoader.as:195]
at
mx.rpc.wsdl::WSDLLoader/resultHandler()[E:\dev\flex_3_beta3\sdk\frameworks\projects\rpc\src\mx\rpc\wsdl\WSDLLoader.as:173]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at
mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::dispatchRpcEvent()[E:\dev\flex_3_beta3\sdk\frameworks\projects\rpc\src\mx\rpc\AbstractInvoker.as:175]
at
mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::resultHandler()[E:\dev\flex_3_beta3\sdk\frameworks\projects\rpc\src\mx\rpc\AbstractInvoker.as:198]
at
mx.rpc::Responder/result()[E:\dev\flex_3_beta3\sdk\frameworks\projects\rpc\src\mx\rpc\Responder.as:48]
at
mx.rpc::AsyncRequest/acknowledge()[E:\dev\flex_3_beta3\sdk\frameworks\projects\rpc\src\mx\rpc\AsyncRequest.as:81]
at
DirectHTTPMessageResponder/completeHandler()[E:\dev\flex_3_beta3\sdk\frameworks\projects\rpc\src\mx\messaging\channels\DirectHTTPChannel.as:387]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at flash.net::URLLoader/onComplete()




[flexcoders] Re: What's your strategy for handling Errors in WebService.as and WSDL.as?

2008-01-30 Thread Todd
OK, that I can see.  So then will my default FaultHandler be fired
then when the debug player isn't being used?

BTW, I may be having bigger issues with my WSDL and service
defenitions using namespaces on teh nodes and the WebServices base
class not finding the service defeniton.

--Todd

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



 On Wednesday 30 Jan 2008, Todd wrote:
  I can't have a UI that displays the big white box to end users with a
  stack trace.  Thanks.
 
 Only people with the debug player i.e. developers i.e. probably not
your users 
 see this.
 
 -- 
 Tom Chiverton
 Helping to conveniently disseminate virtual convergence
 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 Halliwells LLP, 3 Hardman Square, Spinningfields,
Manchester, M3 3EB.  A list of members is available for inspection at
the registered office. Any reference to a partner in relation to
Halliwells LLP means a member of Halliwells LLP.  Regulated by The
Solicitors Regulation Authority.
 
 CONFIDENTIALITY
 
 This email is intended only for the use of the addressee named above
and may be confidential or legally privileged.  If you are not the
addressee you must not read it and must not use any information
contained in nor copy it nor inform any person other than Halliwells
LLP or the addressee of its existence or contents.  If you have
received this email in error please delete it and notify Halliwells
LLP IT Department on 0870 365 2500.
 
 For more information about Halliwells LLP visit www.halliwells.com.





[flexcoders] Re: E4X Namespace Issues...

2008-01-17 Thread Todd
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 [EMAIL PROTECTED] 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




[flexcoders] Re: E4X Namespace Issues...

2008-01-17 Thread Todd
Is Namespace only in Flex 3 SDK?  (I'm using 2.01).


--- In flexcoders@yahoogroups.com, fourctv [EMAIL PROTECTED] 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





[flexcoders] Re: E4X Namespace Issues...

2008-01-17 Thread Todd
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
 




[flexcoders] Re: E4X Namespace Issues...

2008-01-17 Thread Todd
The e4XParser I speak of is at: 
http://www.adobe.com/devnet/flex/articles/e4x_04.html



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

 I've already included some
 dynamic e4x expression parsers that I found on the web
 
 Tod, 
 
 do you have the urls for those to hand? and would you care to share
them?
 Sorry to be so lazy, but I use e4x occasionally enough for the
syntax to generally escape me when I have to.
 Hence anything I can bookmark for the next time I need a bit of help
with it would be most useful to me (and others?)
 
 many thanks,
 
 Jim.
 
 
 -Original Message-
 From: flexcoders@yahoogroups.com on behalf of Todd
 Sent: Wed 16/01/2008 22:51
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] E4X Namespace Issues...
  
 I'm sure this will have an obvious answer and that it's something that
 I've just been looking at for too long...
 
 I'm trying to select a node from xml where a child has a specific value
 For example:
 var xml:XML =
 communication xmlns=stuffHERE
 folder
 id1/id
 folder
 id2/id
 /folder
 folder
 id3/id
 folder
 id4/id
 /folder
 /folder
 /folder
 
 In the above, I'm using an e4x expression that looks like:
 xml..folder.(id == 3)
 
 All works well when I don't have a namespace declared.
 When I have a name space declared, I keep getting nothing back.
 I'm using the actionscript object:  namespace test=http...
 use namespace test
 
 Any ideas on what I'm doing wrong? BTW, I've tried many, many
 different e4x expressions, none that work.
 
 Also, any techniques for debugging e4x? I've already included some
 dynamic e4x expression parsers that I found on the web. But I find
 that while I can get the expression to work fine dynamically, it still
 doesn't work.
 
 I've posted this over in teh Adobe Forums, too, as I'm not really sure
 which place is the best place to go for help.
 
 Thanks a bunch
 
 Here's my test MXML file, sorry for how ugly it looks in this window.,
 Im hoping you can just copy this and paste it into a new MXML file
 for you to look at...:
 
 
 ?xml version=1.0 encoding=utf-8?
 mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
 layout=horizontal
   mx:Script
   ![CDATA[
   import mx.logging.targets.TraceTarget;
   import com.theriabook.util.logging.TraceLogOutput;
   private var comm:XML = 
 CommunicationHierarchy

xmlns=http://www.directTestmarketing.com/ws/schemas/communicationHierarchyService;
  folder
 id13/id
 recordTypeFOLDER/recordType
 iconIdicon id/iconId
 labellabel/label
 shortDescriptionshort description/shortDescription
 descriptionFolder 21 description/description
 externalId1/externalId
 template
id21/id
recordTypeTEMPLATE/recordType
iconIdicon id/iconId
labellabel/label
shortDescriptionshort description/shortDescription
descriptionTemplate 22 description/description
externalId1/externalId
 /template
 folder
id14/id
recordTypeFOLDER/recordType
iconIdicon id/iconId
labellabel/label
shortDescriptionshort description/shortDescription
descriptionFolder 31 description/description
externalId1/externalId
link
   id13/id
   recordTypeTEMPLATE/recordType
   iconIdicon id/iconId
   labellink label/label
   urllink url/url
   shortDescriptionshort description/shortDescription
   descriptiondescription of link - 14/description
/link
 /folder
 folder
id15/id
recordTypeFOLDER/recordType
iconIdicon id/iconId
labellabel/label
shortDescriptionshort description/shortDescription
descriptionFolder 36 description/description
externalId1/externalId
link
   id15/id
   recordTypeTEMPLATE/recordType
   iconIdicon id/iconId
   labellink label/label
   urllink url/url
   shortDescriptionshort description/shortDescription
   descriptiondescription of link - 16/description
/link
 /folder
 link
id8/id
recordTypeTEMPLATE/recordType
iconIdicon id/iconId
labellink label/label
urllink url/url
shortDescriptionshort description/shortDescription
descriptiondescription of link - 9/description
 /link
 link
id12/id
recordTypeTEMPLATE/recordType
iconIdicon id/iconId
labellink label/label
urllink url/url
shortDescriptionshort description/shortDescription
descriptiondescription of link - 13

[flexcoders] Re: E4X Namespace Issues...

2008-01-17 Thread Todd
OOops, nevermind about the Namespace in Flex 2.0.  Memory lapse.

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

 Is Namespace only in Flex 3 SDK?  (I'm using 2.01).
 
 
 --- 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
 





[flexcoders] Re: E4X Namespace Issues...

2008-01-17 Thread Todd
Also, I've discovered something interesting.  In the XML Document, if
I provide a namespace prefix, i.e., xmlns:com=http://...; then it all
works as expected.  So then my question becomes more about how to get
the default namespace, not prefixed with an alias, to become visible
to e4x.  

Thanks,
Todd


--- In flexcoders@yahoogroups.com, fourctv [EMAIL PROTECTED] 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





[flexcoders] Re: Dynamic evaluation of E4X expression

2008-01-17 Thread Todd
Google for something called E4XParser.as.  I think I found it on
Adobe, but I'm not 100% certain.  It allows you to debug your e4x at
runtime.  Very useful.

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

 Hi,
 
 I find the E4X expression language very powerful, and would like to
 leverage it to find elements in an xml document.
 
 The problem is that I get the E4X expression at runtime, so I'm
 looking for a way to dynamically invoke the E4X expression.
 
 Something like:
 --
 var myXML:XML = 
 order
 item id='1'
 menuNameburger/menuName
 price3.95/price
 /item
 item id='2'
 menuNamefries/menuName
 price1.45/price
 /item
 /order;
 var expression:String = item.(@id==2).menuName;
 
 myXML.something here?(expression);
 --
 
 I first look for an eval function as in javascript, but found that AS3
 does not provide such function any more.
 
 - Xavier





[flexcoders] E4X Namespace Issues...

2008-01-16 Thread Todd
I'm sure this will have an obvious answer and that it's something that
I've just been looking at for too long...

I'm trying to select a node from xml where a child has a specific value
For example:
var xml:XML =
communication xmlns=stuffHERE
folder
id1/id
folder
id2/id
/folder
folder
id3/id
folder
id4/id
/folder
/folder
/folder

In the above, I'm using an e4x expression that looks like:
xml..folder.(id == 3)

All works well when I don't have a namespace declared.
When I have a name space declared, I keep getting nothing back.
I'm using the actionscript object:  namespace test=http...
use namespace test

Any ideas on what I'm doing wrong? BTW, I've tried many, many
different e4x expressions, none that work.

Also, any techniques for debugging e4x? I've already included some
dynamic e4x expression parsers that I found on the web. But I find
that while I can get the expression to work fine dynamically, it still
doesn't work.

I've posted this over in teh Adobe Forums, too, as I'm not really sure
which place is the best place to go for help.

Thanks a bunch

Here's my test MXML file, sorry for how ugly it looks in this window.,
Im hoping you can just copy this and paste it into a new MXML file
for you to look at...:


?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
layout=horizontal
mx:Script
![CDATA[
import mx.logging.targets.TraceTarget;
import com.theriabook.util.logging.TraceLogOutput;
private var comm:XML = 
CommunicationHierarchy
xmlns=http://www.directTestmarketing.com/ws/schemas/communicationHierarchyService;
 folder
id13/id
recordTypeFOLDER/recordType
iconIdicon id/iconId
labellabel/label
shortDescriptionshort description/shortDescription
descriptionFolder 21 description/description
externalId1/externalId
template
   id21/id
   recordTypeTEMPLATE/recordType
   iconIdicon id/iconId
   labellabel/label
   shortDescriptionshort description/shortDescription
   descriptionTemplate 22 description/description
   externalId1/externalId
/template
folder
   id14/id
   recordTypeFOLDER/recordType
   iconIdicon id/iconId
   labellabel/label
   shortDescriptionshort description/shortDescription
   descriptionFolder 31 description/description
   externalId1/externalId
   link
  id13/id
  recordTypeTEMPLATE/recordType
  iconIdicon id/iconId
  labellink label/label
  urllink url/url
  shortDescriptionshort description/shortDescription
  descriptiondescription of link - 14/description
   /link
/folder
folder
   id15/id
   recordTypeFOLDER/recordType
   iconIdicon id/iconId
   labellabel/label
   shortDescriptionshort description/shortDescription
   descriptionFolder 36 description/description
   externalId1/externalId
   link
  id15/id
  recordTypeTEMPLATE/recordType
  iconIdicon id/iconId
  labellink label/label
  urllink url/url
  shortDescriptionshort description/shortDescription
  descriptiondescription of link - 16/description
   /link
/folder
link
   id8/id
   recordTypeTEMPLATE/recordType
   iconIdicon id/iconId
   labellink label/label
   urllink url/url
   shortDescriptionshort description/shortDescription
   descriptiondescription of link - 9/description
/link
link
   id12/id
   recordTypeTEMPLATE/recordType
   iconIdicon id/iconId
   labellink label/label
   urllink url/url
   shortDescriptionshort description/shortDescription
   descriptiondescription of link - 13/description
/link
 /folder
 template
id44/id
recordTypeTEMPLATE/recordType
iconIdicon id/iconId
labellabel/label
shortDescriptionshort description/shortDescription
descriptionTemplate 45 description/description
externalId1/externalId
 /template
 template
id45/id
recordTypeTEMPLATE/recordType
iconIdicon id/iconId
labellabel/label
shortDescriptionshort description/shortDescription
descriptionTemplate 46 description/description
externalId1/externalId
 /template
  /CommunicationHierarchy

private namespace directTest =
http://www.directTestmarketing.com/ws/schemas/communicationHierarchyService;;
use namespace directTest;

public var directTest2:Namespace 

[flexcoders] Re: What's the best way to bind ValueOject model data to a form and back again

2007-12-17 Thread Todd
Thanks Kevin.  Your solution is what I ended up doing naturally (I
posted the question few days ago and needed to get something done).  

I thought back to my days dealing with Visual Basic 6 and remembered
items like TextBoxes had a DataValue associated with it.  So, I
subclassed TextInput, and subclassed a Validator (because in my
application the user can input dates in multiple formats:  MMDDYY,
MM-DD-, MM/DD/YYY, etc).

I then added a modelValue property that is bindable and set to the
Date on the Model (or Numbers, etc.).  On the set method, a formatter
is applied to the date and then output to the text box.

Then when users edit the data, a valueCommit event is fired where I
run the custom validator that checks if the date is in one of the many
formats allowed, and then I set the modelValue to the new date entered
 and raise an event so the model can be changed to reflect everything.  

It all words well.  Plus, it had the nice side effect in that I'm
keeping Validators and Formatters inside the specific fields,
simplifying those forms with 30 or 40 input fields.

I've basically created about 5 or 6 of my own formatted TextInput
controls and just place those into the MXML and whalah...works like a
charm.

Thanks for your suggestion because it totally confirms with what I
ended up doing.

--Todd



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

 I have solved this problem this way.
 
 1) Extend a component that you want to use for data entry, such as a  
 TextInput component.
 
 2) I add a private property with called _dataProvider OR _dateReference.
 
 3) I then add a public getter ( with the [Bindable] tag if you want  
 to allow others to bind to you) and setter for this property
 
 4) In the setter is where you put your business logic related to how  
 you want the string to appear in the text box.  You set the text box  
 'text property explicitly here.  Because the setter will always get  
 called when the bound data changes, you are essentially binding the  
 text box to the value as well.
 
 5) Add a valueCommitt, focusOut or change event handler to the  
 component so that you can handle the input data.  This handler will  
 set your private variable when the user enters some input.
 
 That should do it.  Of course you can extend this further with  
 formatters or switch statements to handle different feature...   
 etc... but hopefully you get the idea.  It is pretty simple and very  
 powerful.
 
 In your view code you will just write something like this.
 
   MyCustomDateEntry id=myDate dateReference={model.someDate} /
 
 You can bind a Date object from the model, but the text box will show  
 whatever you tell it to.  To get the Date back you just use  
 myDate.dateReference.
 
 You may also want to check out the DateField control.  It pretty much  
 has the functionality you described built into it... with a nice  
 calendar to boot.
 
 - Kevin
 
 
 
 
 On Dec 10, 2007, at 1:22 PM, Todd wrote:
 
  Hello All,
  I've been trying to wrap my mind around this.
  I have a ValueBoject model that has a date properties and number
  properties (one of many) that are bound to a TextInput fields on a  
  form.
  What's the best way to handle two-way data validating that the text
  input has a valid date in it. More importantly, how do you bind a
  specifically formatted date from the Model.
  Say my model has a valid Date on it, and I want to have it displayed
  in a textBox as 12/10/2007. The user changes the text box, and then I
  want the model to have a valid Date object from the input text. The
  key here is that the format input by a user and the format displayed
  in the TextInput is different than the raw data that is bound to the
  model.
  What to do if I bind a new date that hasn't been set in the model
  yet and I want something like a - (Hyphen) to appear in the form.
  It seems like the default databinding functionality breaks down
  pretty quickly. What are some of the techniques people use to convert
  items on a VO object for display purposes in a form, take form input
  and format it for specific model data?
  Or, do I just need to not use default databinding of my model to
  form inputs and instead have a method, that takes the VO, and manually
  binds the data, doing the appropriate conversions as necessary. And
  then to go the other way, after the form has been filled in and is
  validated, covert to the model?
 
  Thanks for any suggestions.
 
 
 





[flexcoders] Re: Help with Printing (relates to Scaling Object, just before sending printjob)

2007-12-17 Thread Todd
Could you try chaining Events?

In your function when you scale your object, can you fire off an event
when the object scaling is done.  And then in the listener for thisnew
event, fire off the Print Job?

I don't know the specifics of the PrintJob API, or what you're doing
wtih Object scaling.  But I've had to deal with a lot of image
thumbnail creation in the past and I had to create a bunch of custom
events and chain them together so I could control how the image was
loading, then the generation of the thumbnail, then the loading of the
thumbnail image, and then the adding it to a Tile.

I imagine something similar would be appropriate here.  Are jsut using
scaling properties  to change the size of your object for ptinting, or
 is there something else going on?



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

 Greetings All!
 
 I have a major problem, where I have a function that properly scales an
 Object *just* before sending it to the printer.
 
 The issue is, the Object isn't scaling fast enough, so by the time it
 gets added to the PrintJob, it still isn't the proper scale - and looks
 completely wrong on the actual printout.
 
 Initially, I figured I could simply scale the Object first (in an
 entirely different function), then create some intentional pauses in the
 code (or use callLater in the right places), THEN run my PrintJob
 function code.  BUT, my scaling functions rely on information brought
 back from the PrintJob - like PageWidth and PageHeight - which means, my
 Scaling Function must be called from within my PrintJob function.
 
 Bottom line, is that everything is happening too quickly, for the
 PrintJob to capture the properly scaled object.
 
 Is there a way for me to insert some intentional pauses, to slow things
 down, and give the object to be printed, time to properly scale, before
 getting sent to the PrintJob?
 
 Thank you in advance, for any help you can offer.
 
 Mike





[flexcoders] Re: Printing multiple objects per page, how to?

2007-12-17 Thread Todd
Just add your Panel and HBox to another container, and send this other
container to the print job.

Here's the pseudo code:

  var newContainer:VBox = new Vbox();
  newContainer.add( hbMainTitle );
  newContainer.add( dspChildWithFocus);
  printJob.addObject (newContainer);

Viola.

Well, you might have to experiment with this.  newContainer may have
to be added to a container...but I don't know off the top of my head.
 But you can see the solution.



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

 I would like to create a generic screen print module for my 
 application. I have it working mostly. I can select print from the 
 menu bar and it will render the module with focus.
 
 I was feeling giddy when I got that to work and I decided to add a 
 heading to the page that prints. I have an object (hbox) on my screen 
 that would look good as a heading, so I did an addObject. This of 
 course creates a new page. After searching around for a solution I 
 decided that I will ask the assembled masses, and go to bed.
 
 How can I merge multiple items onto a single page?
 
 In this case I have a Panel and a HBox. I would like the HBox on top, 
 a small gap and then the panel.
 
 Below is the code that doesn't work;
 
 private function PrintPanel():void
 {
   var dspChildWithFocus:Object = this.getChildAt
 (this.numChildren -1);
   var strPrintObject:String = 
 dspChildWithFocus.child.strPrintObject
 
 // Create an instance of the FlexPrintJob class.
 var printJob:FlexPrintJob = new FlexPrintJob();
   printJob.printAsBitmap = true;
 
 // Start the print job.
 if (printJob.start() != true) return;
 
 // Add the object to print. Scale to fit the width
 printJob.addObject(hbMainTitle, 
 FlexPrintJobScaleType.MATCH_WIDTH);
 printJob.addObject(dspChildWithFocus.child[strPrintObject], 
 FlexPrintJobScaleType.MATCH_WIDTH);
 
 // Send the job to the printer.
 printJob.send();
 
 }
 
 Anoter related question - I haven't tried to print this on a real 
 printer yet (I am working remotely with no shared printer) only pdf. 
 Will I have problems with printing outside the printable area of the 
 printer?
 
 Paul





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

2007-12-17 Thread Todd

I'd not worry about crafting a strict Object heiarchy.  I've yet to
see a perfect Domain object model that mimics all these relationships,
etc.  Especially when trying to mimic that of a relational database. 
What tends to happen is that you optimize for your domain model at a
given point in time, then 6 months later a new feature requrest comes
in and there's no way to elegantly support it.  So then you need to
add it on anyway. 

Think of the VOs in your Flex application layer as Working UI VOs and
not necessarily that of a perfectly modeled domain.  

And then you need to take into consideration when someone really needs
to have the sub-objects of the parent.  Sometimes they're needed,
sometimes they're not.  I tend to use more controlled bulk getting of
data and map it to custom VOs for that specific purpose.  I.e.,
sometimes on one Pet listing screen, I need 10 properties to help
filter for pets on.  On another I could need 15 more, along with a
list of immunizations for those pets.  Instead of trying to make one
VO and one set of data access work for both, usually resulting in too
much thought and sacrificing performance in each use case, I'll just
craft a couple different VOs PetListingVO PetsAndTheirImmunizationsVO
and go with it.
  Sometimes a bunch of data needs to be batched up and sent to the
server for an update.  Sometimes it's perfectly fine to send the
updates individually.  

Something like that anyway.

I've worked in a lot of large Financial types of applications where
we've always tried to get a perfect Domain model, and have yet to see
it work.  There's usually too many fringe cases.  Too many
optimization tweaks thrown in, etc.  Inheritance for VO mapping is
usually an unnecessary complexity.


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

 I completely agree with the Hibernate a lot of joins issue.  I look  
 at some of these queries and it's a little nuts.  On the other hand,  
 we are deep into using Annotations with Hibernate which has been much  
 easier for us to maintain than the mapping files. I'll have to take a  
 look at iBatis and see how good a fit it would be for us in the  
 future. (It might be too late to migrate over now unless we found it  
 absolutely necessary for performance).  I am assuming you had to  
 write your own assembler for that OR is there one publicly available  
 to integrate with DataServices?
 
 As far as inheritance issue, ironically, the overloaded PetVO with  
 the pet type property is how I have dealt with this in the past  
 (..but I have also always written my own db queries).  I find it a  
 little messy on the client since you end up having to keep track of  
 what properties go with what, but it works and was very efficient.   
 On this project I decided to try my hand at programming everything  
 from a more strict Object perspective and seeing if Hibernate could  
 handle the rest... Hibernate seems to be doing ok (remains to be  
 seen), but I am running into some limitations with DataServices.
 
 I'll keep poking at this and see if I can apply some of your  
 suggestions without completely abandoning out data model.
 
 Thanks, Kevin
 
 
 
 On Dec 15, 2007, at 6:33 PM, simonjpalmer wrote:
 
  I had the exact same problem, I think the issue is not really
  inheritance but the graph of objects being arbitrarily complex and  
  deep.
 
  I got round it by ditching the managed associations completely and
  going for RPC calls to my Java classes using RemoteObjects. I found
  myself too tangled by the destinations and weird and undesirable
  behaviour of the framework that I had no control over.
 
  In my case a close examination of the reality of the usage of my
  object model showed that I rarely had a true cyclic graph and in fact
  towards the edges it was much more like a directed acyclic graph, so I
  constrained the application to enforce that and altered the server
  transaction to lift the graph in little hierarchies rather than as
  individual components. I think it is always a good idea to make sure
  your model fits exactly what you are doing rather than some potential
  fringe use cases at the cost of complexity. You have probably done
  that already.
 
  The suggested solution of separating the objects and the relationships
  is a great idea as well, and you can reconstitute it quite easily on
  the client side if you need to. This is probably my next major
  architectural overhaul. On the client the use of a Dictionary or
  Object as a proxy for a hash map offers some interesting architectural
  opportunities.
 
  As an aside I also found that very deep hierarchies of objects caused
  Hibernate to create a lot of joins and or inefficient sub-queries and
  it was impractical for my purposes from a performance standpoint. I
  found iBatis a much better fit because 1) I have SQL expertise and 2)
  I don't have the issue of having to make sure my persistence tier
  works on all known rdbms's so I could take 

  1   2   >