[flexcoders] AIR 1.5.3 application build problem on Linux

2009-12-14 Thread aejaz_98
Hi,

I have a build environment set on RHEL Linux which uses
ant to produce a .air installer for my application. With
Flex SDK 3.3  ant the .air installer used to install
the application successfully on Windows XP/Vista  application
worked as expected.

Recently I upgraded to Flex 3.4 SDK on the Linux build machine,
but now the AIR application installed (on Windows XP) with 
the ant generated .air installer(on the Linux build machine) doesn't show the 
startup screen, although in the task manager I see that the process is alive.

In order to figure out what was wrong I did quite a bit of
searching but couldn't find anything worthwhile. Then I 
tried the same build script on Windows XP using Flex 3.4
SDK  the generated application(after installation) worked 
successfully. The only difference between Linux  windows
was that Windows XP had AIR runtime whereas Linux did not.
Since things worked with SDK 3.3 with no AIR runtime on Linux,
I doubt that this is an issue. 

So far both Linux  Windows had AIR SDK 1.5.2, I then upgraded
both to AIR SDK 1.5.3 but there was no change in behaviour
i.e. installer produced in Windows worked but installer 
created on Linux didn't.

Finally, I tried using adl as follows. The installed application
(using the .air installer created on Windows) had following 
directory structure,

C:\App
C:\App\App.swf
C:\App\META-INF\AIR\application.xml
C:\App\META-INF\AIR\publisherid
C:\App\META-INF\AIR\hash

I copied all the files under META-INF to C:\App  then tried
to run the following, command,

C:\App adl application.xml

That showed the startup screen.

Then I uninstalled the application  installed the application
using the .air installer created on Linux  then copied the 
contents under META-INF to c:\App  tried the same command again,
this time the startup screen didn't show up but on the command 
prompt, following error was shown,

VerifyError: Error #1014: Class mx.core::WindowedApplication could not be found.
at flash.display::MovieClip/nextFrame()
at mx.managers::SystemManager/deferredNextFrame()
at mx.managers::SystemManager/preloader_initProgressHandler()
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.preloaders::Preloader/timerHandler()
at flash.utils::Timer/_timerDispatch()
at flash.utils::Timer/tick()

I don't have any idea about why the WindowedApplication won't
be found in this particular case. If anyone has any clue, 
please help.

Thanks,
Aejaz



[flexcoders] Re: AIR 1.5.3 application build problem on Linux

2009-12-14 Thread aejaz_98

Looks like it is not possible to build a windows air installer
on Linux with SDK 3.4(with either SDK 1.5.2 or 1.5.3) although
this worked fine with Flex SDK 3.4(with included AIR SDK 1.5)
earlier.

Strangely when I now try to switch back to Flex SDK 3.3, I am 
getting these errors,

App_mx_managers_SystemManager.as(75): col: 38 Error: Method marked override 
must override another method.
[mxmlc] 
[mxmlc] override public function get preloadedRSLs():Dictionary
[mxmlc]  ^
[mxmlc] 
[mxmlc] _App_mx_managers_SystemManager.as(87): col: 34 Error: Method marked 
override must override another method.
[mxmlc] 
[mxmlc] override public function allowDomain(... domains):void
[mxmlc]  ^
[mxmlc] 
[mxmlc] _App_mx_managers_SystemManager.as(105): col: 34 Error: Method 
marked override must override another method.
[mxmlc] 
[mxmlc] override public function allowInsecureDomain(... 
domains):void
[mxmlc]  ^
[mxmlc] 

Any help would be appreciated.

Thanks,
Aejaz

--- In flexcoders@yahoogroups.com, aejaz_98 aejaz...@... wrote:

 Hi,
 
 I have a build environment set on RHEL Linux which uses
 ant to produce a .air installer for my application. With
 Flex SDK 3.3  ant the .air installer used to install
 the application successfully on Windows XP/Vista  application
 worked as expected.
 
 Recently I upgraded to Flex 3.4 SDK on the Linux build machine,
 but now the AIR application installed (on Windows XP) with 
 the ant generated .air installer(on the Linux build machine) doesn't show the 
 startup screen, although in the task manager I see that the process is alive.
 
 In order to figure out what was wrong I did quite a bit of
 searching but couldn't find anything worthwhile. Then I 
 tried the same build script on Windows XP using Flex 3.4
 SDK  the generated application(after installation) worked 
 successfully. The only difference between Linux  windows
 was that Windows XP had AIR runtime whereas Linux did not.
 Since things worked with SDK 3.3 with no AIR runtime on Linux,
 I doubt that this is an issue. 
 
 So far both Linux  Windows had AIR SDK 1.5.2, I then upgraded
 both to AIR SDK 1.5.3 but there was no change in behaviour
 i.e. installer produced in Windows worked but installer 
 created on Linux didn't.
 
 Finally, I tried using adl as follows. The installed application
 (using the .air installer created on Windows) had following 
 directory structure,
 
 C:\App
 C:\App\App.swf
 C:\App\META-INF\AIR\application.xml
 C:\App\META-INF\AIR\publisherid
 C:\App\META-INF\AIR\hash
 
 I copied all the files under META-INF to C:\App  then tried
 to run the following, command,
 
 C:\App adl application.xml
 
 That showed the startup screen.
 
 Then I uninstalled the application  installed the application
 using the .air installer created on Linux  then copied the 
 contents under META-INF to c:\App  tried the same command again,
 this time the startup screen didn't show up but on the command 
 prompt, following error was shown,
 
 VerifyError: Error #1014: Class mx.core::WindowedApplication could not be 
 found.
 at flash.display::MovieClip/nextFrame()
 at mx.managers::SystemManager/deferredNextFrame()
 at mx.managers::SystemManager/preloader_initProgressHandler()
 at flash.events::EventDispatcher/dispatchEventFunction()
 at flash.events::EventDispatcher/dispatchEvent()
 at mx.preloaders::Preloader/timerHandler()
 at flash.utils::Timer/_timerDispatch()
 at flash.utils::Timer/tick()
 
 I don't have any idea about why the WindowedApplication won't
 be found in this particular case. If anyone has any clue, 
 please help.
 
 Thanks,
 Aejaz





[flexcoders] Re: AIR 1.5.3 application build problem on Linux

2009-12-14 Thread aejaz_98

Looks like it is not possible to build a windows air installer
on Linux with SDK 3.4(with either SDK 1.5.2 or 1.5.3) although
this worked fine with Flex SDK 3.4(with included AIR SDK 1.5)
earlier.

Strangely when I now try to switch back to Flex SDK 3.3, I am 
getting these errors,

App_mx_managers_SystemManager.as(75): col: 38 Error: Method marked override 
must override another method.
[mxmlc] 
[mxmlc] override public function get preloadedRSLs():Dictionary
[mxmlc]  ^
[mxmlc] 
[mxmlc] _App_mx_managers_SystemManager.as(87): col: 34 Error: Method marked 
override must override another method.
[mxmlc] 
[mxmlc] override public function allowDomain(... domains):void
[mxmlc]  ^
[mxmlc] 
[mxmlc] _App_mx_managers_SystemManager.as(105): col: 34 Error: Method 
marked override must override another method.
[mxmlc] 
[mxmlc] override public function allowInsecureDomain(... 
domains):void
[mxmlc]  ^
[mxmlc] 

Any help would be appreciated.

Thanks,
Aejaz

--- In flexcoders@yahoogroups.com, aejaz_98 aejaz...@... wrote:

 Hi,
 
 I have a build environment set on RHEL Linux which uses
 ant to produce a .air installer for my application. With
 Flex SDK 3.3  ant the .air installer used to install
 the application successfully on Windows XP/Vista  application
 worked as expected.
 
 Recently I upgraded to Flex 3.4 SDK on the Linux build machine,
 but now the AIR application installed (on Windows XP) with 
 the ant generated .air installer(on the Linux build machine) doesn't show the 
 startup screen, although in the task manager I see that the process is alive.
 
 In order to figure out what was wrong I did quite a bit of
 searching but couldn't find anything worthwhile. Then I 
 tried the same build script on Windows XP using Flex 3.4
 SDK  the generated application(after installation) worked 
 successfully. The only difference between Linux  windows
 was that Windows XP had AIR runtime whereas Linux did not.
 Since things worked with SDK 3.3 with no AIR runtime on Linux,
 I doubt that this is an issue. 
 
 So far both Linux  Windows had AIR SDK 1.5.2, I then upgraded
 both to AIR SDK 1.5.3 but there was no change in behaviour
 i.e. installer produced in Windows worked but installer 
 created on Linux didn't.
 
 Finally, I tried using adl as follows. The installed application
 (using the .air installer created on Windows) had following 
 directory structure,
 
 C:\App
 C:\App\App.swf
 C:\App\META-INF\AIR\application.xml
 C:\App\META-INF\AIR\publisherid
 C:\App\META-INF\AIR\hash
 
 I copied all the files under META-INF to C:\App  then tried
 to run the following, command,
 
 C:\App adl application.xml
 
 That showed the startup screen.
 
 Then I uninstalled the application  installed the application
 using the .air installer created on Linux  then copied the 
 contents under META-INF to c:\App  tried the same command again,
 this time the startup screen didn't show up but on the command 
 prompt, following error was shown,
 
 VerifyError: Error #1014: Class mx.core::WindowedApplication could not be 
 found.
 at flash.display::MovieClip/nextFrame()
 at mx.managers::SystemManager/deferredNextFrame()
 at mx.managers::SystemManager/preloader_initProgressHandler()
 at flash.events::EventDispatcher/dispatchEventFunction()
 at flash.events::EventDispatcher/dispatchEvent()
 at mx.preloaders::Preloader/timerHandler()
 at flash.utils::Timer/_timerDispatch()
 at flash.utils::Timer/tick()
 
 I don't have any idea about why the WindowedApplication won't
 be found in this particular case. If anyone has any clue, 
 please help.
 
 Thanks,
 Aejaz





[flexcoders] Re: AIR 1.5.3 application build problem on Linux

2009-12-14 Thread aejaz_98




Looks like it is not possible to build a windows air installer
on Linux with SDK 3.4(with either SDK 1.5.2 or 1.5.3) although
this worked fine with Flex SDK 3.4(with included AIR SDK 1.5)
earlier.

Strangely when I now try to switch back to Flex SDK 3.3, I am 
getting these errors,

App_mx_managers_SystemManager.as(75): col: 38 Error: Method marked override 
must override another method.
[mxmlc] 
[mxmlc] override public function get preloadedRSLs():Dictionary
[mxmlc]  ^
[mxmlc] 
[mxmlc] _App_mx_managers_SystemManager.as(87): col: 34 Error: Method marked 
override must override another method.
[mxmlc] 
[mxmlc] override public function allowDomain(... domains):void
[mxmlc]  ^
[mxmlc] 
[mxmlc] _App_mx_managers_SystemManager.as(105): col: 34 Error: Method 
marked override must override another method.
[mxmlc] 
[mxmlc] override public function allowInsecureDomain(... 
domains):void
[mxmlc]  ^
[mxmlc] 

Any help would be appreciated.

Thanks,
Aejaz

--- In flexcoders@yahoogroups.com, aejaz_98 aejaz...@... wrote:

 Hi,
 
 I have a build environment set on RHEL Linux which uses
 ant to produce a .air installer for my application. With
 Flex SDK 3.3  ant the .air installer used to install
 the application successfully on Windows XP/Vista  application
 worked as expected.
 
 Recently I upgraded to Flex 3.4 SDK on the Linux build machine,
 but now the AIR application installed (on Windows XP) with 
 the ant generated .air installer(on the Linux build machine) doesn't show the 
 startup screen, although in the task manager I see that the process is alive.
 
 In order to figure out what was wrong I did quite a bit of
 searching but couldn't find anything worthwhile. Then I 
 tried the same build script on Windows XP using Flex 3.4
 SDK  the generated application(after installation) worked 
 successfully. The only difference between Linux  windows
 was that Windows XP had AIR runtime whereas Linux did not.
 Since things worked with SDK 3.3 with no AIR runtime on Linux,
 I doubt that this is an issue. 
 
 So far both Linux  Windows had AIR SDK 1.5.2, I then upgraded
 both to AIR SDK 1.5.3 but there was no change in behaviour
 i.e. installer produced in Windows worked but installer 
 created on Linux didn't.
 
 Finally, I tried using adl as follows. The installed application
 (using the .air installer created on Windows) had following 
 directory structure,
 
 C:\App
 C:\App\App.swf
 C:\App\META-INF\AIR\application.xml
 C:\App\META-INF\AIR\publisherid
 C:\App\META-INF\AIR\hash
 
 I copied all the files under META-INF to C:\App  then tried
 to run the following, command,
 
 C:\App adl application.xml
 
 That showed the startup screen.
 
 Then I uninstalled the application  installed the application
 using the .air installer created on Linux  then copied the 
 contents under META-INF to c:\App  tried the same command again,
 this time the startup screen didn't show up but on the command 
 prompt, following error was shown,
 
 VerifyError: Error #1014: Class mx.core::WindowedApplication could not be 
 found.
 at flash.display::MovieClip/nextFrame()
 at mx.managers::SystemManager/deferredNextFrame()
 at mx.managers::SystemManager/preloader_initProgressHandler()
 at flash.events::EventDispatcher/dispatchEventFunction()
 at flash.events::EventDispatcher/dispatchEvent()
 at mx.preloaders::Preloader/timerHandler()
 at flash.utils::Timer/_timerDispatch()
 at flash.utils::Timer/tick()
 
 I don't have any idea about why the WindowedApplication won't
 be found in this particular case. If anyone has any clue, 
 please help.
 
 Thanks,
 Aejaz




[flexcoders] Re: AIR 1.5.3 application build problem on Linux

2009-12-14 Thread aejaz_98
Sorry about multiple posts. Here is the update,

The compilation error was due to having mxmlc.jar in CLASSPATH from SDK 3.4 
while FLEX_HOME was pointing to SDK 3.4 installation. Once I
went back to SDK 3.3, air installer created on Linux started working
on Windows again. 

I also created the dump of the configuration files(using -dump-config option) 
during the build on both Linux  Windows while (using SDK 3.4 on bothe Linux  
Windows)  there was hardly any difference. Seems that there is some problem 
definitely.

Thanks,
Aejaz



--- In flexcoders@yahoogroups.com, aejaz_98 aejaz...@... wrote:

 Hi,
 
 I have a build environment set on RHEL Linux which uses
 ant to produce a .air installer for my application. With
 Flex SDK 3.3  ant the .air installer used to install
 the application successfully on Windows XP/Vista  application
 worked as expected.
 
 Recently I upgraded to Flex 3.4 SDK on the Linux build machine,
 but now the AIR application installed (on Windows XP) with 
 the ant generated .air installer(on the Linux build machine) doesn't show the 
 startup screen, although in the task manager I see that the process is alive.
 
 In order to figure out what was wrong I did quite a bit of
 searching but couldn't find anything worthwhile. Then I 
 tried the same build script on Windows XP using Flex 3.4
 SDK  the generated application(after installation) worked 
 successfully. The only difference between Linux  windows
 was that Windows XP had AIR runtime whereas Linux did not.
 Since things worked with SDK 3.3 with no AIR runtime on Linux,
 I doubt that this is an issue. 
 
 So far both Linux  Windows had AIR SDK 1.5.2, I then upgraded
 both to AIR SDK 1.5.3 but there was no change in behaviour
 i.e. installer produced in Windows worked but installer 
 created on Linux didn't.
 
 Finally, I tried using adl as follows. The installed application
 (using the .air installer created on Windows) had following 
 directory structure,
 
 C:\App
 C:\App\App.swf
 C:\App\META-INF\AIR\application.xml
 C:\App\META-INF\AIR\publisherid
 C:\App\META-INF\AIR\hash
 
 I copied all the files under META-INF to C:\App  then tried
 to run the following, command,
 
 C:\App adl application.xml
 
 That showed the startup screen.
 
 Then I uninstalled the application  installed the application
 using the .air installer created on Linux  then copied the 
 contents under META-INF to c:\App  tried the same command again,
 this time the startup screen didn't show up but on the command 
 prompt, following error was shown,
 
 VerifyError: Error #1014: Class mx.core::WindowedApplication could not be 
 found.
 at flash.display::MovieClip/nextFrame()
 at mx.managers::SystemManager/deferredNextFrame()
 at mx.managers::SystemManager/preloader_initProgressHandler()
 at flash.events::EventDispatcher/dispatchEventFunction()
 at flash.events::EventDispatcher/dispatchEvent()
 at mx.preloaders::Preloader/timerHandler()
 at flash.utils::Timer/_timerDispatch()
 at flash.utils::Timer/tick()
 
 I don't have any idea about why the WindowedApplication won't
 be found in this particular case. If anyone has any clue, 
 please help.
 
 Thanks,
 Aejaz





[flexcoders] How to compile multiple modules with mxmlc ant task

2009-01-27 Thread aejaz_98
Hi,

Is it possible to give multiple mxml files under the 
file property of mxmlc task ?

Without this my build.xml is becoming very big due to 
repetition of many mxmlc sections, the only difference being 
the value of the file property.

Thanks,
Aejaz



[flexcoders] Re: How to compile multiple modules with mxmlc ant task

2009-01-27 Thread aejaz_98
Thanks a lot. I was thinking something along those lines but was
hoping that it would be possible to specify multiple files somehow.

Aejaz

--- In flexcoders@yahoogroups.com, Maciek Sakrejda msakre...@... wrote:

 Refactor your build.xml to pass the module mxml target as an ant
 property, and call this from another target. E.g.,
 
 target name=build-modules
   antcall target=build-module
 param name=module.mxml value=module1.mxml/
   /antcall
   antcall target=build-module
 param name=module.mxml value=module2.mxml/
   /antcall
   antcall target=build-module
 param name=module.mxml value=module3.mxml/
   /antcall
 /target
 
 target name=build-module
   mxmlc file=flex/src/${module.mxml} ...
 
 -- 
 Maciek Sakrejda
 Truviso, Inc.
 http://www.truviso.com
 
 -Original Message-
 From: aejaz_98 aejaz...@...
 Reply-To: flexcoders@yahoogroups.com
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] How to compile multiple modules with mxmlc ant
 task
 Date: Tue, 27 Jan 2009 18:31:32 -
 
 Hi,
 
 Is it possible to give multiple mxml files under the 
 file property of mxmlc task ?
 
 Without this my build.xml is becoming very big due to 
 repetition of many mxmlc sections, the only difference being 
 the value of the file property.
 
 Thanks,
 Aejaz





[flexcoders] AIR application installation Error #0

2008-12-11 Thread aejaz_98
I am getting the Error #0 with installing an AIR application on
Windows XP professional SP2. The AIR runtime is latest (i.e. version 1.5).

Here's what happened, a previous install of the application was
successful. After uninstalling using Add/Remove programs, the new
version of the application was not installed due to Error #0 shown
during install  following error was logged in .airappinstall.log

Error occurred; beginning rollback: [ErrorEvent type=error
bubbles=false cancelable=false eventPhase=2 text=1603 errorID=0] 

After manually removing the registry entries for the application, a
reinstall was attempted but it remains unsuccessful despite trying
many times. I read through the posts related to this issue  have made
sure that the currently logged in user belongs to the Administrator
group. Windows Event Viewer log shows the following,

Date : 12/10/08  Source : MsiInstaller
Time : 5:53:02 PMCategory : None
Type : Error Event ID : 11714
User : D4M8\admin
Computer : D4M8

Description :
Product : SampleAIRApplication - Error 1714. The older version of
SampleAIRApplication cannot be removed. Contact your technical support
group. System error 1612.

After this I tried to clean up the system registry with a registry
cleaner tool, but it still doesn't install. Please help as this is
happening on a customer machine  I am unable to reproduce this inhouse.

The contents of .airappinstall.log are attached.

Thanks
Aejaz

Starting app install of
file:///C:/Documents%20and%20Settings/admin/Desktop/New%20Folder/SampleAIRApplication/SampleAIRApplication/SampleAIRApplication.air
UI SWF load is complete
UI initialized
Unpackaging to C:\Documents and Settings\admin\Local
Settings\temp\fla66.tmp
unpackaging is complete
application is bound to side-by-side version 1.0
application is bound to this version of the runtime
app id SampleAIRApplication
pub id 31D0E4A8305D8249DE1F9377B612665B83A0EAEA.1
application not currently installed
Waiting for user confirmation
User confirmed action: install
creating native installer in: C:\Documents and Settings\admin\Local
Settings\temp\fla67.tmp
native installer creation complete
Starting install
Destination for installed application is C:\Program Files
Beginning install
Installing C:\Documents and Settings\admin\Local
Settings\temp\fla67.tmp\setup.msi
Error occurred; beginning rollback: [ErrorEvent type=error
bubbles=false cancelable=false eventPhase=2 text=1603 errorID=0]
Rolling back install of C:\Documents and Settings\admin\Local
Settings\temp\fla67.tmp\setup.msi
Rollback due to error complete
stateInstalling: [ErrorEvent type=error bubbles=false
cancelable=false eventPhase=2 text=1603 errorID=0]
starting cleanup of temporary files
application installer exiting





[flexcoders] Re: Flex 3 Bug or Expected Behavior : TileList refresh

2007-11-07 Thread aejaz_98
Hi Alex,

Thanks for your reply. I am doing the exact same thing  things are 
working as I want them to. I was curious about why the DATA_CHANGE
event is not received or is it that the DATA_CHANGE event have no
relevance here. Please let me know.

-Aejaz

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

 The data property is not used in the outer TL it is only used by
 renderers.  You'd reset the inner TL's DPs when you change the DP on the
 outer TL like in your button's click handler
 
  
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of aejaz_98
 Sent: Tuesday, November 06, 2007 3:59 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Flex 3 Bug or Expected Behavior : TileList refresh
 
  
 
 I have a TileList in my application where each element is rendered by 
 a custom ItemRenderer. Each element of the above TileList
 has another TileList in it which is rendered for the first time by
 initialize event.
 
 The outer TileList's dataprovider is an ArrayList of VO's which are
 returned from the server side. There is an inner array in each 
 of the elements of the above ArrayList which requires some processing
 to create another ArrayList which becomes the dataprovider for the 
 inner TileList(s).
 
 I have a button on my UI clicking on which I change the dataprovider 
 of the outer TileList to a new ArrayList(containing exact same type of 
 elements as before but with different data). I could not find an easy
 way to re-render the inner TileList(s) based on the new dataprovider 
 for the outer TileList. 
 
 After searching the list, I found a reply from Matt on a similar
 problem where he instructed to override the set data method for the
 outer TileList  refresh the datprovider of inner TileList in the body
 of the overridden method. This part works perfectly. 
 
 But if I try to dispatch a FlexEvent.DATA_CHANGE from the overriden 
 set data method  put a dataChange handler on the outer TileList, 
 the datachange handler doesn't get called. Is this a bug or expected 
 behavior ? How do I receive the notification for dataChange event ? 
 I was thinking of switching the dataProvider of the inner TileList 
 in dataChange handler. Is this not the right way ?
 
 Thanks,
 Aejaz





[flexcoders] Flex 3 Bug or Expected Behavior : TileList refresh

2007-11-06 Thread aejaz_98
I have a TileList in my application where each element is rendered by 
a custom ItemRenderer. Each element of the above TileList
has another TileList in it which is rendered for the first time by
initialize event.

The outer TileList's dataprovider is an ArrayList of VO's which are
returned from the server side. There is an inner array in each 
of the elements of the above ArrayList which requires some processing
to create another ArrayList which becomes the dataprovider for the 
inner TileList(s).

I have a button on my UI clicking on which I change the dataprovider 
of the outer TileList to a new ArrayList(containing exact same type of 
elements as before but with different data). I could not find an easy
way to re-render the inner TileList(s) based on the new dataprovider 
for the outer TileList. 

After searching the list, I found a reply from Matt on a similar
problem where he instructed to override the set data method for the
outer TileList  refresh the datprovider of inner TileList in the body
of the overridden method. This part works perfectly. 

But if I try to dispatch a FlexEvent.DATA_CHANGE from the overriden 
set data method  put a dataChange handler on the outer TileList, 
the datachange handler doesn't get called. Is this a bug or expected 
behavior ? How do I receive the notification for dataChange event ? 
I was thinking of switching the dataProvider of the inner TileList 
in dataChange handler. Is this not the right way ?

Thanks,
Aejaz



[flexcoders] Re: [flex2dev] Object type Coercion error.

2006-06-28 Thread aejaz_98
Hi Ian,

I also encountered the same problem with Beta 3  it seemed like a 
bug to not be able to use a custom component inside a repeater.
I also arrived at the same solution as you i.e. not use a custom
component  use Flex components only.

May be this has been fixed in the released version, I haven't 
tried it yet.

Thanks,
Aejaz

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

 I'm guessing the mapping from your cfc to the as object isn't working.
  Just a hunch.
 
 DK
 
 On 6/27/06, Ian Skinner [EMAIL PROTECTED] wrote:
  //Define public variables
  [Bindable]
  public var drawData:Object;
 
  Ok, changing the data type of the drawData variable to Object
which is what a repeater currentItem returns worked!  But is this the
way I want this to work?  Just use a generic Object type not my nice
custom Object I create with the drawDay.as file and is returned from
my drawDay.cfc with the remoteObject call?
 
 
  --
  Ian Skinner
  Web Programmer
  BloodSource
  www.BloodSource.org
  Sacramento, CA
 
  -
  | 1 |   |
  -  Binary Soduko
  |   |   |
  -
 
  C code. C code run. Run code run. Please!
  - Cynthia Dunning
 
  Confidentiality Notice:  This message including any
  attachments is for the sole use of the intended
  recipient(s) and may contain confidential and privileged
  information. Any unauthorized review, use, disclosure or
  distribution is prohibited. If you are not the
  intended recipient, please contact the sender and
  delete any copies of this message.
 
 
 
 
 
  --
  Flexcoders Mailing List
  FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
  Search Archives:
http://www.mail-archive.com/flexcoders%40yahoogroups.com
  Yahoo! Groups Links
 
 
 
 
 
 
 
  -- Forwarded message --
  From: Ian Skinner [EMAIL PROTECTED]
  To: [EMAIL PROTECTED], [EMAIL PROTECTED], flexcoders@yahoogroups.com
  Date: Tue, 27 Jun 2006 15:41:59 -0700
  Subject: [flex2dev] Object type Coercion error.
  I am receiving this error:
  TypeError: Error #1034: Type Coercion failed: cannot convert
[EMAIL PROTECTED] to drawDay.
 
  When I run this code:
  mx:Repeater
  id=dayCells
  dataProvider={days}
  startingIndex={weekRows.currentItem}
  count=7
ian:dayFormat2
 drawData={drawDay(dayCells.currentItem)}
  test={dayCells.currentItem.formatedDate}
/ian:dayFormat2
  /mx:Repeater
 
  How can I figure out what kind of object dayCells.currentItem is
being returned by the Repeater control?  {days} is an arrayCollection
of drawDay objects, how can I get the Repeater currentItem to be an
object of the drawDay type?
 
  --
  Ian Skinner
  Web Programmer
  BloodSource
  www.BloodSource.org
  Sacramento, CA
 
  -
  | 1 |   |
  -  Binary Soduko
  |   |   |
  -
 
  C code. C code run. Run code run. Please!
  - Cynthia Dunning
 
  Confidentiality Notice:  This message including any
  attachments is for the sole use of the intended
  recipient(s) and may contain confidential and privileged
  information. Any unauthorized review, use, disclosure or
  distribution is prohibited. If you are not the
  intended recipient, please contact the sender and
  delete any copies of this message.
 
 
 
 
  --
  You are subscribed to flex2dev. To unsubscribe, send an email to
[EMAIL PROTECTED] with the words 'unsubscribe flex2dev' as the subject of
the email.
 
  Flex2Dev is run by CFCZone (www.cfczone.org) and supported by
CFXHosting (www.cfxhosting.com).
 
 
 
 
 
 
 -- 
 Douglas Knudsen
 http://www.cubicleman.com
 this is my signature, like it?







 Yahoo! Groups Sponsor ~-- 
Check out the new improvements in Yahoo! Groups email.
http://us.click.yahoo.com/6pRQfA/fOaOAA/yQLSAA/nhFolB/TM
~- 

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

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

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

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





[flexcoders] F2B3: (Problem)Using Repeater from ActionScript

2006-06-22 Thread aejaz_98



Hi,I am trying to create a Repeater  execute it usingActionScript. I have corresponding mxml codewhich executes correctly but the ActionScript codedoesn't seem to be doing anything on execution. I'mnot understanding how the repeater binding looks likein ActionScript or if any additional thing needs to bedone.Please help.Thanks,AejazHere is the ActionScript code,?xml version="1.0"?mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="*"width="150" height="150" backgroundColor="#FF" borderStyle="solid" initialize="rTest()"mx:Script![CDATA[import mx.containers.FormItem;import mx.containers.Form;import mx.collections.ArrayCollection;import mx.core.*;import mx.controls.* ;[Bindable]public var myArray:Array=[{label:"A", value:"1"},   {label:"B", value:"2"}];private function rTest():void{ var ac:ArrayCollection = new ArrayCollection(myArray); var rep:Repeater = new Repeater(); rep.dataProvider = ac ; var form:Form = new Form(); var form_item:FormItem = new FormItem(); var btn:Button = new Button(); var label:Label = new Label(); label.text = rep.currentItem.label ; form_item.addChild(label); btn.label = rep.currentItem.value ; form_item.addChild(btn); rep.addChild(form_item); form.addChild(rep); this.addChild(form);  rep.initializeRepeater(this, true); rep.executeChildBindings();}]]/mx:Script/mx:ApplicationThe same thing in MXML which works fine,?xml version="1.0"?mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="*"width="150" height="150" backgroundColor="#FF" borderStyle="solid" mx:Script![CDATA[[Bindable]public var myArray:Array=[{label:"A", value:"1"},{label:"B", value:"2"}];   ]]/mx:Scriptmx:Form label="TestForm"   mx:Repeater id="myrep" dataProvider="{new ArrayCollection(myArray)}"   mx:FormItem label="{myrep.currentItem.label}"   mx:Button label="{myrep.currentItem.value}"/   /mx:FormItem  /mx:Repeater /mx:Form/mx:Application

__._,_.___





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








   






  
  
SPONSORED LINKS
  
  
  

Web site design development
  
  
Computer software development
  
  
Software design and development
  
  


Macromedia flex
  
  
Software development best practice
  

   
  







  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  






__,_._,___



[flexcoders] Re: Flex2B3: Problem with a custom component nested repeaters

2006-06-19 Thread aejaz_98



I changed the second repeater to a TileList as follows,?xml version="1.0" encoding="utf-8"?mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" xmlns:ns1="components.*"mx:Script![CDATA[[Bindable] public var myArray:Array=["A","B","C","D"];[Bindable]public var myQArray:Array=[{label:"A"}];]]/mx:Script   mx:ArrayCollection id="myAC" source="{myArray}"/ mx:ArrayCollection id="myQArr" source="{myQArray}"/ mx:Accordion id="accordion" x="139" y="303" width="200" height="200"  mx:Repeater id="myrep" dataProvider="{myAC}"   ns1:QuestionForm label="{myrep.currentItem}" width="199" height="178"   mx:TileList dataProvider="{myQArr}" maxColumns="1" mx:FormItem label="" mx:Button label="Inner"//mx:FormItem   /mx:TileList   mx:FormItem label=""mx:Button label="Outer"/   /mx:FormItem   /ns1:QuestionForm  /mx:Repeater /mx:Accordion/mx:ApplicationNow I get the compilation error : Multiple initializers for property 'dataProvider'. (note: 'dataProvider' is the default property of 'mx.controls.TileList'). Please let me know why is it taking the dataProvider for the repeater ?Thanks,Aejaz--- In flexcoders@yahoogroups.com, "aejaz_98" [EMAIL PROTECTED] wrote: Hi,  I have the following application,  ?xml version="1.0" encoding="utf-8"? mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" xmlns:ns1="components.*" mx:Script ![CDATA[ [Bindable] public var myArray:Array=["A","B","C","D"]; [Bindable] public var myQArray:Array=["A"]; ]] /mx:Script  mx:ArrayCollection id="myAC" source="{myArray}"/  mx:ArrayCollection id="myQArr" source="{myQArray}"/  mx:Accordion id="accordion" x="139" y="303" width="200" height="200"  mx:Repeater id="myrep" dataProvider="{myAC}"  ns1:QuestionForm label="{myrep.currentItem}" width="199" height="178"  mx:Repeater  id="myrep2" dataProvider="{myQArr}"  mx:FormItem label=""  mx:Button label="Inner"/  /mx:FormItem  /mx:Repeater  mx:FormItem label=""  mx:Button label="Outer"/  /mx:FormItem  /ns1:QuestionForm  /mx:Repeater  /mx:Accordion /mx:Application  QuestionForm is a custom component defined as follows,  ?xml version="1.0" encoding="utf-8"? mx:Form xmlns:mx="http://www.adobe.com/2006/mxml"  mx:Script   public var categoryID:Number;  /mx:Script /mx:Form  /mx:Application  When I run this application, Flash gives the following Exception  the application fails to load. However, if I change QuestionForm to Form, the application runs fine. Please let me know what is missing here.  TypeError: Error #1034: Type Coercion failed: cannot convert mx.core::[EMAIL PROTECTED] to Array.  at mx.core::UIComponent/createReferenceOnParentDocument()  at mx.core::Container/createComponentFromDescriptor()  at mx.core::Container/createComponentsFromDescriptors()  at mx.containers::Accordion/::instantiateSelectedChild()  at mx.containers::Accordion/::commitSelectedIndex()  at mx.containers::Accordion/mx.containers:Accordion::commitProperties()  at mx.core::UIComponent/validateProperties()  at mx.managers::LayoutManager/::validateProperties()  at mx.managers::LayoutManager/::doPhasedInstantiation()  at mx.core::UIComponent/::callLaterDispatcher2()  at mx.core::UIComponent/::callLaterDispatcher() Thanks, Aejaz


__._,_.___





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








   






  
  
SPONSORED LINKS
  
  
  

Web site design development
  
  
Computer software development
  
  
Software design and development
  
  


Macromedia flex
  
  
Software development best practice
  

   
  







  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  






__,_._,___



[flexcoders] Re: Flex2B3: Problem with a custom component nested repeaters

2006-06-19 Thread aejaz_98
Hi Jason,

Thanks for the clarification  the explanation. I'll start with Item
renderers.

-Aejaz

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

 Aejaz,
 
  
 
 What the error message is saying is that you have assigned
 two values to the TileList's dataProvider property. The first place is
 the mxml attribute: mx:TileList dataProvider={myQArr}  The
 message also explains that the TileList's default property is
 dataProvider. What this means is that if you place tags inside of the
 TileList and don't specify which property they belong to, then it
 assigns the value to the default property (which is dataProvider). The
 FormItem inside of TileList is thus being assigned to TileList's
 dataProvider property. 
 
  
 
 TileLists are not containers, so they can't contain other components
 inside of it. You need to use an itemRenderer if you want to control the
 appearance of the individual items.
 
  
 
 I'm assuming in this situation that you didn't mean to have the FormItem
 inside of the TileLIst. Just remove it and you should be able to
 compile. 
 
  
 
 Jason
 
  
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of aejaz_98
 Sent: Monday, June 19, 2006 7:16 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: Flex2B3: Problem with a custom component 
 nested repeaters
 
  
 
 I changed the second repeater to a TileList as follows,
 
 ?xml version=1.0 encoding=utf-8?
 mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
 layout=absolute xmlns:ns1=components.*
 mx:Script
 ![CDATA[
 [Bindable] 
 public var myArray:Array=[A,B,C,D];
 [Bindable]
 public var myQArray:Array=[{label:A}];
 ]]
 /mx:Script
   
 mx:ArrayCollection id=myAC source={myArray}/
 mx:ArrayCollection id=myQArr source={myQArray}/
 mx:Accordion id=accordion x=139 y=303 width=200
 height=200
 mx:Repeater id=myrep dataProvider={myAC}
 ns1:QuestionForm label={myrep.currentItem} width=199
 height=178
 nb! sp;   mx:TileList dataProvider={myQArr}  maxColumns=1
 
 mx:FormItem label=
 mx:Button label=Inner/
 /mx:FormItem
 /mx:TileList
 mx:FormItem label=
 mx:Button label=Outer/
 /mx:FormItem
 /ns1:QuestionForm
 /mx:Repeater
! /mx:Accordion
 
 /mx:Application
 
 N! ow I get the compilation error : Multiple initializers for property
 'dataProvider'. (note: 'dataProvider' is the default property of
 'mx.controls.TileList').
 Please let me know why is it taking the dataProvider for the repeater ?
 
 
 Thanks,
 Aejaz
 
 
 
 
 
 
 --- In flexcoders@yahoogroups.com, aejaz_98 aejaz_98@ wrote:
 
  Hi,
  
  I have the following application,
  
  ?xml version=1.0 encoding=utf-8?
  mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
  layout=absolute xmlns:ns1=components.*
  mx:Script
  ![CDATA[
  [Bindable]
  public var myArray:Array=[A,B,C,D];
  [Bindable]
  public var myQArray:Array=[A];
  ]]
  /mx:Script
  mx:ArrayCollection id=myAC source={myArray}/
  mx:ArrayCollection id=! myQArr source={myQArray}/
  mx:Accordion id=accordion x=139 y=303 width=200
  height=200
  mx:Repeater id=myrep dataProvider={myAC}
  ns1:QuestionForm label={myrep.currentItem} width=199
  height=178
  mx:Repeater id=myrep2 dataProvider={myQArr}
  mx:FormItem label=
  mx:Button label=Inner/
  /mx:FormItem
  /mx:Repeater
  mx:FormItem label=
  mx:Button label=Outer/
  /mx:FormItem
  /ns1:QuestionForm
  /mx:Repeater
  /mx:Accordion
  /mx:Application
  
  QuestionForm is a custom component defined as follows,
  
  ?xm! l version=1.0 encoding=utf-8?
  mx:Form xmln! s:mx=ht tp://www.adobe.com/2006/mxml
  mx:Script
  public var categoryID:Number;
  /mx:Script
  /mx:Form
  
  /mx:Application
  
  When I run this application, Flash gives the following Exception  the
  application fails to load. However, if I change QuestionForm to Form,
  the application runs fine. Please let me know what is missing here.
  
  TypeError: Error #1034: Type Coercion failed: cannot convert
  mx.core::[EMAIL PROTECTED] to Array.
  at mx.core::UIComponent/createReferenceOnParentDocument()
  at mx.core::Container/createComponentFromDescriptor()
  at mx.core::Container/createComponentsFromDescriptors()
  at mx.containers::Accordion/::instantiateSelectedChild()
  at mx.containers::Accordion/::commitSelectedIndex()
  at
  mx.containers::Accordion/mx.containers:A! ccordion::commitProperties()
  at mx.core::UIComponent/validateProperties()
  at mx.managers::LayoutManager/::validateProperties()
  at mx.managers::LayoutManager/::doPhasedInstantiation()
  at mx.core::UIComponent/::callLaterDispatcher2()
  at mx.core::UIComponent/::callLaterDispatcher()
  
  
  
  
  Thanks,
  Aejaz
 







 Yahoo! Groups Sponsor ~-- 
Check out the new improvements in Yahoo! Groups email.
http

[flexcoders] Re: Flex2B3: Problem making the number of panes in accordion dynamic

2006-06-14 Thread aejaz_98
It seems that Form id can't be dynamic, so I dropped the form id  the
Accordion is drawn correctly with the panes taking input from myArray.

If I added one more element to myArray, I expected the Accordion be
updated automatically  but that  doesn't happen. Why ?

How do I redraw the  accordion once myArray is updated ?

Here is the code,

mx:Script
![CDATA[

[Bindable]
public var myArray:Array=[A,B,C,D];
private function updateArray():void
{
 myAC.source.push(E);
}
]]
/mx:Script

mx:Accordion id=accordion x=139 y=303 width=200 height=200
 mx:Repeater id=myrep dataProvider={myAC}
 mx:Form label={myrep.currentItem}
 /mx:Form
 /mx:Repeater
  /mx:Accordion
  mx:Button x=426 y=404 label=UpdateArray id=update
click=updateArray()/


Thanks,
Aejaz

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

 Hi,

 I have the following code,

 mx:Script
 ![CDATA[
 [Bindable]
 public var myArray:Array=[A,B,C,D];
 ]]
 /mx:Script

 mx:ArrayCollection id=myAC source={myArray}/

 mx:Accordion x=139 y=303 width=200 height=200
  mx:Repeater id=myrep dataProvider={myAC}
  mx:Form id={myrep.currentItem}
 label={myrep.currentItem}/
  /mx:Repeater
   /mx:Accordion

 The error I get while building is,   '{myrep.currentItem}' is not a
 valid identifier.   Is this not allowed in this case ?

 What I want to do eventually is to get the contents of the array from
a
 back end database  then use them to show the panes of the Accordion.
Is
 there an alternative way to achieve this ?

 Thanks,
 Aejaz








 Yahoo! Groups Sponsor ~-- 
You can search right from your browser? It's easy and it's free.  See how.
http://us.click.yahoo.com/_7bhrC/NGxNAA/yQLSAA/nhFolB/TM
~- 

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

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

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

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




[flexcoders] Flex2B3: Problem making the number of panes in accordion dynamic

2006-06-13 Thread aejaz_98



Hi,I have the following code,mx:Script![CDATA[[Bindable]public var myArray:Array=["A","B","C","D"];]]/mx:Scriptmx:ArrayCollection id="myAC" source="{myArray}"/mx:Accordion x="139" y="303" width="200" height="200"   mx:Repeater id="myrep" dataProvider="{myAC}"mx:Form id="{myrep.currentItem}" label="{myrep.currentItem}"/   /mx:Repeater/mx:AccordionThe error I get while building is, '{myrep.currentItem}' is not a valid identifier. Is this not allowed in this case ?What I want to do eventually is to get the contents of the array from a back end database  then use them to show the panes of the Accordion. Is there an alternative way to achieve this ?Thanks,Aejaz 

__._,_.___





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








   






  
  
SPONSORED LINKS
  
  
  

Web site design development
  
  
Computer software development
  
  
Software design and development
  
  


Macromedia flex
  
  
Software development best practice
  

   
  







  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  






__,_._,___



[flexcoders] Flex2B3: Problem returning Object[] from a RemoteObject call

2006-06-11 Thread aejaz_98



Hi,I am calling a java method on server side which returnsan array of type Object[]. On the client side I do thefollowing,var arr:Array = remoteObject.call();Doing this gives me an exception which says,TypeError: Error #1034: Type Coercion failed: cannot convert mx.rpc::[EMAIL PROTECTED] to Array.After changing the type of arr to AsyncToken ,I do see that there is a result field in the AsyncToken object which was returned but that too is null. What is the significance of the AsyncToken object here ?According to the Flex Developer's guide(page 1154), I would havegot an Array as the result of the call. Please let me know what am I doing wrong.Thanks,Aejaz

__._,_.___





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








   






  
  
SPONSORED LINKS
  
  
  

Web site design development
  
  
Computer software development
  
  
Software design and development
  
  


Macromedia flex
  
  
Software development best practice
  

   
  







  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  






__,_._,___



[flexcoders] Re: Flex2B3: Problem returning Object[] from a RemoteObject call

2006-06-11 Thread aejaz_98
I just wanted to add that the call is executing successfully on the
server side as shown by tomacat debug log.

Thanks,
Aejaz

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

 Hi,
 
 I am calling a java method on server side which returns
 an array of type Object[]. On the client side I do the
 following,
 
 var arr:Array = remoteObject.call();
 
 Doing this gives me an exception which says,
 
 TypeError: Error #1034: Type Coercion failed: cannot convert
 mx.rpc::[EMAIL PROTECTED] to Array.
 
 After changing the type of arr to AsyncToken ,I do see that
 there is a result field in the AsyncToken object which was
 returned but that too is null. What is the significance of
 the AsyncToken object here ?
 
 According to the Flex Developer's guide(page 1154), I would have
 got an Array as the result of the call. Please let me know what am
 I doing wrong.
 
 Thanks,
 Aejaz







 Yahoo! Groups Sponsor ~-- 
Everything you need is one click away.  Make Yahoo! your home page now.
http://us.click.yahoo.com/AHchtC/4FxNAA/yQLSAA/nhFolB/TM
~- 

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

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

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

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




[flexcoders] Re: Flex2B3: Problem returning Object[] from a RemoteObject call

2006-06-11 Thread aejaz_98
Thanks Peter. I didn't realize this as I was calling methods which
were not returning anything. Added a handler  it works as you mentioned.

-Aejaz

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

 Aejaz,
  
 This is expected.
  
 You can't assign the result of a remote object call immediately to a
 value. The Flash Player needs to make calls asynchronously so that the
 movie does not stall while waiting for a response from the network.
 Instead you're returned a token to help you track results from
 asynchronous invocations. This is called the Asynchronous Completion
 Token (ACT) pattern. You need to have a result handler registered for
 your RemoteObject (or individual operation, or individual invocation on
 the token itself). When the result event is raised, your handler will
 get a ResultEvent which will have the Array result (as well as access to
 the ACT token.
  
 Pete
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of aejaz_98
 Sent: Sunday, June 11, 2006 6:00 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Flex2B3: Problem returning Object[] from a
 RemoteObject call
 
 
 
 Hi,
 
 I am calling a java method on server side which returns
 an array of type Object[]. On the client side I do the
 following,
 
 var arr:Array = remoteObject.call();
 
 Doing this gives me an exception which says,
 
 TypeError: Error #1034: Type Coercion failed: cannot convert
 mx.rpc::[EMAIL PROTECTED] to Array.
 
 After changing the type of arr to AsyncToken ,I do see that 
 there is a result field in the AsyncToken object which was 
 returned but that too is null. What is the significance of 
 the AsyncToken object here ?
 
 According to the Flex Developer's guide(page 1154), I would have
 got an Array as the result of the call. Please let me know what am 
 I doing wrong.
 
 Thanks,
 Aejaz







 Yahoo! Groups Sponsor ~-- 
Protect your PC from spy ware with award winning anti spy technology. It's free.
http://us.click.yahoo.com/97bhrC/LGxNAA/yQLSAA/nhFolB/TM
~- 

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

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

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

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





[flexcoders] How to break a Flex application in modules ?

2006-05-23 Thread aejaz_98



Hi,

I have a general question about how to go about breaking a large Flex 
application in modules. If an application has a large number of
states, what is the recommended practice to break it in modules so
that I don't
have a huge mxml file which will make compilation slow  code
navigation in it complex.

Thanks,
Aejaz 










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








  
  
SPONSORED LINKS
  
  
  

Web site design development
  
  
Computer software development
  
  
Software design and development
  
  


Macromedia flex
  
  
Software development best practice
  

   
  







  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  











[flexcoders] Re: Data Mapping problem

2006-04-28 Thread aejaz_98



Thanks Peter.

That did the trick.

Regards,
Aejaz

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

 To cast a type in ActionScript you use this syntax:
 
 tmpDoctor = samples.Doctor(event.result);
 
 (i.e. it is not the same syntax as Java).
 
 Also, in your Java class, note it must have a public no-args constructor
 and the fields (or bean getter/setters) must be public.
 
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of aejaz_98
 Sent: Thursday, April 27, 2006 9:32 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Data Mapping problem
 
 
 Hi,
 
 I have a an ActionScript class Doctor.as as follows,
 
 package samples
 {
 [Bindable]
 [RemoteClass(alias=samples.ht.base.Doctor)]
 dynamic public class Doctor
 {
 public var firstName:String;
 public var lastName:String;
 public var phoneNumber:String;
 }
 }
 
 The corresponding Java class Doctor.java is,
 
 package samples.ht.base ;
 
 public class Doctor {
 String firstName;
 String lastName;
 String phoneNumber;
 
 public Doctor(String fname, String lname, String phoneNum){
 firstName = fname;
 lastName = lname;
 phoneNumber = phoneNum;
 }
 }
 
 I make a RemoteObject method call which returns a Doctor. In my me! thod
 which handles the result, I have,
 
 [Bindable] 
 public var tmpDoctor:Doctor ;
 
 private function getNameHandler(event:ResultEvent):void
 { 
 tmpDoctor = (samples.Doctor)event.result ;
 ..
 
 
 If I don't have the dynamic keyword in Doctor.as, I get an Exception
 from Flash which says,
 ReferenceError: Error #1056: Cannot create property _phone_number on
 samples.Doctor
 
 Reading about Error 1056 implied that I had to make the Doctor class(in
 Actionscript) dynamic. What is happening now is that,! I am getting
 control in getNameHandler method after the remot! e method is executed
 but after the line in blue is executed, tmpDoctor is null. By looking at
 event.result from the debugger I can see the following,
 
 result = samples.Doctor (@550cb26)
 firstName = null
 _firstName = Michael
 lastName = null
 _lastName = Schumacher
 phoneNumber = null
 _phone_number = 100
 
 Why is casting not working properly ? I had expected that tmpDoctor
 would have its fields properly populated. Why is that not happening 
 what is the way to access the results returned in the fields starting
 with underscores ? I am sorry in advance as I have just started learning
 Actionscript.
 
 Thanks,
 Aejaz
 
 
 
 --
 Flexcoders Mailing List
 FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
 Search Archives:
 http://www.mail-archive.com/flexcoders%40yahoogroups.com 
 
 
 
 
 SPONSORED LINKS 
 Web site design development
 http://groups.yahoo.com/gads?t=msk=Web+site+design+developmentw1=Web+
 site+design+developmentw2=Computer+software+developmentw3=Software+des
 ign+and+developmentw4=Macromedia+flexw5=Software+development+best+prac
 ticec=5s=166.sig=L-4QTvxB_quFDtMyhrQaHQ  Computer software
 development
 http://groups.yahoo.com/gads?t=msk=Computer+software+developmentw1=We
 b+site+design+developmentw2=Computer+software+developmentw3=Software+d
 esign+and+developmentw4=Macromedia+flexw5=Software+development+best+pr
 acticec=5s=166.sig=lvQjSRfQDfWudJSe1lLjHw  Software design and
 development
 http://groups.yahoo.com/gads?t=msk=Software+design+and+developmentw1=
 Web+site+design+developmentw2=Computer+software+developmentw3=Software
 +design+and+developmentw4=Macromedia+flexw5=Software+development+best+
 practicec=5s=166.sig=1pMBCdo3DsJbuU9AEmO1oQ  
 Macromedia flex
 http://groups.yahoo.com/gads?t=msk=Macromedia+flexw1=Web+site+design+
 developmentw2=Computer+software+developmentw3=Software+design+and+deve
 lopmentw4=Macromedia+flexw5=Software+development+best+practicec=5s=1
 66.sig=OO6nPIrz7_EpZI36cYzBjw  Software development best
 practice
 http://groups.yahoo.com/gads?t=msk=Software+development+best+practice
 w1=Web+site+design+developmentw2=Computer+software+developmentw3=Softw
 are+design+and+developmentw4=Macromedia+flexw5=Software+development+be
 st+practicec=5s=166.sig=f89quyyulIDsnABLD6IXIw  
 
 
 
 YAHOO! GROUPS LINKS 
 
 
  
 *  Visit your group flexcoders
 http://groups.yahoo.com/group/flexcoders  on the web.
   
 *  To unsubscribe from this group, send an email to:
   [EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED] 
   
 *  Your use of Yahoo! Groups is subject to the Yahoo! Terms of
 Service http://docs.yahoo.com/info/terms/ . 
 
 
 











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








  
  
SPONSORED LINKS
  
  
  

Web site design development
  
  
Computer software development
  
  
Software design and development

[flexcoders] Data Mapping problem

2006-04-27 Thread aejaz_98



Hi,I have a an ActionScript class Doctor.as as follows,package samples{[Bindable][RemoteClass(alias="samples.ht.base.Doctor")]dynamic public class Doctor{ public var firstName:String; public var lastName:String; public var phoneNumber:String;}}The corresponding Java class Doctor.java is,package samples.ht.base ;public class Doctor { String firstName; String lastName; String phoneNumber; public Doctor(String fname, String lname, String phoneNum){ firstName = fname; lastName = lname; phoneNumber = phoneNum; }}I make a RemoteObject method call which returns a Doctor. In my method which handles the result, I have, [Bindable]   public var tmpDoctor:Doctor ;private function getNameHandler(event:ResultEvent):void  {tmpDoctor = (samples.Doctor)event.result ;   ..If I don't have the dynamic keyword in Doctor.as, I get an Exception from Flash which says,ReferenceError: Error #1056: Cannot create property _phone_number on samples.DoctorReading about Error 1056 implied that I had to make the Doctor class(in Actionscript) dynamic. What is happening now is that, I am getting control in getNameHandler method after the remote method is executed but after the line in blue is executed, tmpDoctor is null. By looking at event.result from the debugger I can see the following,result = samples.Doctor (@550cb26) firstName = null _firstName = "Michael" lastName = null _lastName = "Schumacher" phoneNumber = null _phone_number = "100"Why is casting not working properly ? I had expected that tmpDoctor would have its fields properly populated. Why is that not happening  what is the way to access the results returned in the fields starting with underscores ? I am sorry in advance as I have just started learning Actionscript.Thanks,Aejaz






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








  
  
SPONSORED LINKS
  
  
  

Web site design development
  
  
Computer software development
  
  
Software design and development
  
  


Macromedia flex
  
  
Software development best practice
  

   
  







  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  









[flexcoders] Re: (Flex20b2) RemoteObject access problem

2006-04-26 Thread aejaz_98



Hi Matt,

Thanks for your reply. Yes, I am running the SWF using the URL
http://localhost:8080/flex/SimpleRemoteObject/SimpleRemoteObject.html

I also changed the channel endpoint URI from
http://{server.name}:{server.port}/{context.root}/messagebroker/amf
to
http://localhost:8080/flex/messagebroker/amf
but I still get the same result i.e. Channel.Connect.Failed error.
NetConnection.Call.Failed error:HTTP:Failed .

Please let me know what else could be missin/misconfigured.

Thanks,
Aejaz

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

 Are you running the SWF from http://localhost:8080/flex/ in your
 browser? Everything seems OK to me otherwise. Try changing the my-am
 channel entry to http://localhost:8080/flex/messagebroker/amf, but you
 shouldn't have needed to do it.
 
 
 
 Matt
 
 
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of aejaz_98
 Sent: Tuesday, April 25, 2006 10:47 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] (Flex20b2) RemoteObject access problem
 
 
 
 Hi,
 
 I have posted a couple of messages on calling a method on a Java object
 using mx:RemoteObject tag but so far I haven't been successful. With
 help from Peter  Suresh I did proceed a little bit further but I am
 still unable to successfully call the method on the server side object.
 Since I described the problem in bits  pieces before, I think that I
 may have missed some step(s) which I don't know about. Here is what I
 have done step by step. Please let me know if I am doing anything wrong
 or not doing something.
 
 Basically what I wanted to do was to verify the connectivity from the
 browser side to a simple Java class on the back end using RemoteObject
 tag before doing anything major. To do this I take a (String) name from
 a TextInput field which is sent to the getString() method of the class
 called Echo which appends Welcome  to the incoming String  returns it
 back. This is displayed by the state 'TargetState'.
 
 1. Here is the mxml file named SimpleRemoteObject.mxml. Please take a
 look at my ActionScript methods as I am new to ActionScript as well.
 
 ?xml version=1.0 encoding=utf-8?
 mx:Application xmlns:mx=http://www.adobe.com/2006/mxml xmlns=*
 layout=absolute
 mx:TraceTarget level=0 /
 mx:Script
 ![CDATA[
 import mx.rpc.events.*; 
 import mx.collections.*;
 import mx.controls.*
 
 private function getNameHandler(event:ResultEvent):void
 {
 Result.text = event.result.toString();
 currentState='TargetState';
 }
 
 private function faultHandler(event:FaultEvent):void
 {
 Alert.show(event.fault.faultstring, Error);
 Alert.show(event.fault.faultDetail, Error); 
 }
 ]]
 /mx:Script
 mx:states 
 mx:State name=TargetState
 mx:RemoveChild child={button1}/
 mx:RemoveChild child={formInput}/
 mx:RemoveChild child={label1}/
 mx:AddChild position=lastChild
 mx:Label x=99 y=130 width=265 height=28
 id=Result/
 /mx:AddChild
 /mx:State
 /mx:states
 
 mx:RemoteObject id=sendStringBack destination=EchoString
 showBusyCursor=true fault=faultHandler(event)
 mx:method name=getString result=getNameHandler(event)
 mx:arguments
 str
 {formInput.text}
 /str
 /mx:arguments
 /mx:method
 /mx:RemoteObject
 mx:TextInput x=119 y=129 id=formInput/
 mx:Button x=119 y=170 label=Submit fontSize=13 id=button1
 click=sendStringBack.getString.send()/
 mx:Label x=119 y=86 text=What is your name ? width=160
 fontSize=15 id=label1/ 
 /mx:Application
 
 For this project I defined the Flex root folder at
 C:\tomcat-5.5.9\webapps\flex  flex server URL to
 http://localhost:8080/flex/.
 
 2. Defined the destination EchoString in
 C:\tomcat-5.5.9\webapps\flex\WEB-INF\flex\flex-remoting-service.xml as
 follows,
 
 adapters
 adapter-definition id=java-object
 class=flex.messaging.services.remoting.adapters.JavaAdapter
 default=true/
 /adapters
 
 default-channels
 channel ref=my-amf/
 /default-channels
 
 destination id=EchoString
 properties
 sourcesamples.SimpleRemoteObject.Echo/source
 /properties
 /destination
 
 3. Saved the mxml file in Flex Builder which created
 C:\tomcat-5.5.9\webapps\flex\SimpleRemoteObject directory  put the
 HTML, SWFs  _javascript_ files in it.
 
 4. Compiled the Java class called Echo.java  put Echo.class in
 C:\tomcat-5.5.9\webapps\flex\WEB-INF\classes\samples\SimpleRemoteObject.
 
 package samples.SimpleRemoteObject;
 public class Echo {
 public Echo(){
 }
 public String getString(String str){
 System.out.println(In Echo::getString(), got  + str);
 return Welcome  + str ;
 }
 }
 
 5. Started tomcat  went to,
 http://localhost:8080/flex/SimpleRemoteObject/SimpleRemoteObject.html
 
 6. First page got painted fine, input a name  clicked on 'Submit'
 
 7. I get Channel.Connect.Failed error. NetConnection.Call.Failed
 error:HTTP:Failed in the Alert box.
 
 C:\tomcat-5.5.9\webapps\flex\WEB-INF\flex\flex-enterprise-services.xml
 has,
 
 channel-definition id=my-amf
 class=mx.messaging.channels.AMFChannel
 endpoint
 uri=http

[flexcoders] Re: (Flex20b2) RemoteObject access problem

2006-04-26 Thread aejaz_98



Hi Muzak,

Thanks for your reply. The JVM version used by tomcat is 1.5.0_04.

Thanks,
Aejaz
 
--- In flexcoders@yahoogroups.com, Muzak [EMAIL PROTECTED] wrote:

 What JVM version is Tomcat using?
 I had that same error with JRun because of an older JVM version.
 You'll need at least 1.4.2_06 (if i'm not mistaken)
 
 kind regards,
 Muzak
 
 - Original Message - 
 From: aejaz_98 [EMAIL PROTECTED]
 To: flexcoders@yahoogroups.com
 Sent: Wednesday, April 26, 2006 3:58 PM
 Subject: [flexcoders] Re: (Flex20b2) RemoteObject access problem
 
 
  Hi Matt,
 
  Thanks for your reply. Yes, I am running the SWF using the URL
  http://localhost:8080/flex/SimpleRemoteObject/SimpleRemoteObject.html
 
  I also changed the channel endpoint URI from
  http://{server.name}:{server.port}/{context.root}/messagebroker/amf
  to
  http://localhost:8080/flex/messagebroker/amf
  but I still get the same result i.e. Channel.Connect.Failed error.
  NetConnection.Call.Failed error:HTTP:Failed .
 
  Please let me know what else could be missin/misconfigured.
 
  Thanks,
  Aejaz
 











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








  
  
SPONSORED LINKS
  
  
  

Web site design development
  
  
Computer software development
  
  
Software design and development
  
  


Macromedia flex
  
  
Software development best practice
  

   
  







  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  












[flexcoders] Re: (Flex20b2) RemoteObject access problem : Success at last

2006-04-26 Thread aejaz_98



Hi Steven,

Thanks a lot for your reply. I recompiled the swf again 
in the Tomcat console I could see that the method on my class
was being called. So, thing that made this whole thing work
was,

Matt's advice to change the endpoint URI to
http://localhost:8080/flex/messagebroker/amf



recompilation of the swf after it.

However on the browser side I am seeing this error in a new window,

An ActionScript error has occurred,
TypeError: Error #1009: null has no properties.
 at SimpleRemoteObject/::getNameHandler()
 at SimpleRemoteObject/___Operation1_result()
 at flash.events::EventDispatcher/dispatchEvent()
 at
mx.rpc::AbstractOperation/http://www.adobe.com/2006/flex/mx/internal::dispatchRpcEvent()
 at
mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::resultHandler()
 at flash.events::EventDispatcher/dispatchEvent()
 at mx.rpc::Producer/acknowledge()
 at
::NetConnectionMessageResponder/NetConnectionChannel.as$36:NetConnectionMessageResponder::handleResult()
 at mx.messaging::MessageResponder/result() 

Any clues ?

Thanks,
Aejaz

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

 Did you recompile the SWF after changing the endpoint URI? 
 
 --- In flexcoders@yahoogroups.com, aejaz_98 aejaz_98@ wrote:
 
  Hi Matt,
  
  Thanks for your reply. Yes, I am running the SWF using the URL
  
 http://localhost:8080/flex/SimpleRemoteObject/SimpleRemoteObject.html
  
  I also changed the channel endpoint URI from
  http://{server.name}:{server.port}/{context.root}/messagebroker/amf
  to
  http://localhost:8080/flex/messagebroker/amf
  but I still get the same result i.e. Channel.Connect.Failed error.
  NetConnection.Call.Failed error:HTTP:Failed .
  
  Please let me know what else could be missin/misconfigured.
  
  Thanks,
  Aejaz
  
  --- In flexcoders@yahoogroups.com, Matt Chotin mchotin@ wrote:
  
   Are you running the SWF from http://localhost:8080/flex/ in your
   browser? Everything seems OK to me otherwise. Try changing the 
 my-am
   channel entry to http://localhost:8080/flex/messagebroker/amf, 
 but you
   shouldn't have needed to do it.
   
   
   
   Matt
   
   
   
   
   
   From: flexcoders@yahoogroups.com 
 [mailto:[EMAIL PROTECTED] On
   Behalf Of aejaz_98
   Sent: Tuesday, April 25, 2006 10:47 PM
   To: flexcoders@yahoogroups.com
   Subject: [flexcoders] (Flex20b2) RemoteObject access problem
   
   
   
   Hi,
   
   I have posted a couple of messages on calling a method on a Java 
 object
   using mx:RemoteObject tag but so far I haven't been successful. 
 With
   help from Peter  Suresh I did proceed a little bit further but I 
 am
   still unable to successfully call the method on the server side 
 object.
   Since I described the problem in bits  pieces before, I think 
 that I
   may have missed some step(s) which I don't know about. Here is 
 what I
   have done step by step. Please let me know if I am doing anything 
 wrong
   or not doing something.
   
   Basically what I wanted to do was to verify the connectivity from 
 the
   browser side to a simple Java class on the back end using 
 RemoteObject
   tag before doing anything major. To do this I take a (String) 
 name from
   a TextInput field which is sent to the getString() method of the 
 class
   called Echo which appends Welcome  to the incoming String  
 returns it
   back. This is displayed by the state 'TargetState'.
   
   1. Here is the mxml file named SimpleRemoteObject.mxml. Please 
 take a
   look at my ActionScript methods as I am new to ActionScript as 
 well.
   
   ?xml version=1.0 encoding=utf-8?
   mx:Application xmlns:mx=http://www.adobe.com/2006/mxml 
 xmlns=*
   layout=absolute
   mx:TraceTarget level=0 /
   mx:Script
   ![CDATA[
   import mx.rpc.events.*; 
   import mx.collections.*;
   import mx.controls.*
   
   private function getNameHandler(event:ResultEvent):void
   {
   Result.text = event.result.toString();
   currentState='TargetState';
   }
   
   private function faultHandler(event:FaultEvent):void
   {
   Alert.show(event.fault.faultstring, Error);
   Alert.show(event.fault.faultDetail, Error); 
   }
   ]]
   /mx:Script
   mx:states 
   mx:State name=TargetState
   mx:RemoveChild child={button1}/
   mx:RemoveChild child={formInput}/
   mx:RemoveChild child={label1}/
   mx:AddChild position=lastChild
   mx:Label x=99 y=130 width=265 height=28
   id=Result/
   /mx:AddChild
   /mx:State
   /mx:states
   
   mx:RemoteObject id=sendStringBack destination=EchoString
   showBusyCursor=true fault=faultHandler(event)
   mx:method name=getString result=getNameHandler
 (event)
   mx:arguments
   str
   {formInput.text}
   /str
   /mx:arguments
   /mx:method
   /mx:RemoteObject
   mx:TextInput x=119 y=129 id=formInput/
   mx:Button x=119 y=170 label=Submit fontSize=13 
 id=button1
   click=sendStringBack.getString.send()/
   mx:Label x=119 y=86 text=What is your name ? 
 width=160
   fontSize=15 id=label1/ 
   /mx:Application

[flexcoders] Re: (Flex20b2) RemoteObject access problem : Success at last

2006-04-26 Thread aejaz_98



Hi Steven,

Thanks for your reply. The problem was thet I was 
referring to a label field id in a new state without
setting the currentState to the new state.

Thanks,
Aejaz

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

 It seems as though the result of your call is null, hence the 
 event.result.toString() call in your getNameHandler() is generating 
 a NullPointerException. 
 
 Do you see a value in the Tomcat console from the System.out call in 
 your SimpleRemoteObject class?
 
 --- In flexcoders@yahoogroups.com, aejaz_98 aejaz_98@ wrote:
 
  Hi Steven,
  
  Thanks a lot for your reply. I recompiled the swf again 
  in the Tomcat console I could see that the method on my class
  was being called. So, thing that made this whole thing work
  was,
  
  Matt's advice to change the endpoint URI to
  http://localhost:8080/flex/messagebroker/amf
  
  
  
  recompilation of the swf after it.
  
  However on the browser side I am seeing this error in a new window,
  
  An ActionScript error has occurred,
  TypeError: Error #1009: null has no properties.
   at SimpleRemoteObject/::getNameHandler()
   at SimpleRemoteObject/___Operation1_result()
   at flash.events::EventDispatcher/dispatchEvent()
   at
  
 mx.rpc::AbstractOperation/http://www.adobe.com/2006/flex/mx/internal::
 dispatchRpcEvent()
   at
  
 mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::re
 sultHandler()
   at flash.events::EventDispatcher/dispatchEvent()
   at mx.rpc::Producer/acknowledge()
   at
  ::NetConnectionMessageResponder/NetConnectionChannel.as$36:NetConnec
 tionMessageResponder::handleResult()
   at mx.messaging::MessageResponder/result() 
  
  Any clues ?
  
  Thanks,
  Aejaz
  
  --- In flexcoders@yahoogroups.com, Steven Toth steventoth@ 
 wrote:
  
   Did you recompile the SWF after changing the endpoint URI? 
   
   --- In flexcoders@yahoogroups.com, aejaz_98 aejaz_98@ wrote:
   
Hi Matt,

Thanks for your reply. Yes, I am running the SWF using the URL

   
 http://localhost:8080/flex/SimpleRemoteObject/SimpleRemoteObject.html

I also changed the channel endpoint URI from
http://{server.name}:{server.port}/
 {context.root}/messagebroker/amf
to
http://localhost:8080/flex/messagebroker/amf
but I still get the same result i.e. Channel.Connect.Failed 
 error.
NetConnection.Call.Failed error:HTTP:Failed .

Please let me know what else could be missin/misconfigured.

Thanks,
Aejaz

--- In flexcoders@yahoogroups.com, Matt Chotin mchotin@ 
 wrote:

 Are you running the SWF from http://localhost:8080/flex/ in 
 your
 browser? Everything seems OK to me otherwise. Try changing 
 the 
   my-am
 channel entry to 
 http://localhost:8080/flex/messagebroker/amf, 
   but you
 shouldn't have needed to do it.
 
 
 
 Matt
 
 
 
 
 
 From: flexcoders@yahoogroups.com 
   [mailto:[EMAIL PROTECTED] On
 Behalf Of aejaz_98
 Sent: Tuesday, April 25, 2006 10:47 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] (Flex20b2) RemoteObject access problem
 
 
 
 Hi,
 
 I have posted a couple of messages on calling a method on a 
 Java 
   object
 using mx:RemoteObject tag but so far I haven't been 
 successful. 
   With
 help from Peter  Suresh I did proceed a little bit further 
 but I 
   am
 still unable to successfully call the method on the server 
 side 
   object.
 Since I described the problem in bits  pieces before, I 
 think 
   that I
 may have missed some step(s) which I don't know about. Here 
 is 
   what I
 have done step by step. Please let me know if I am doing 
 anything 
   wrong
 or not doing something.
 
 Basically what I wanted to do was to verify the connectivity 
 from 
   the
 browser side to a simple Java class on the back end using 
   RemoteObject
 tag before doing anything major. To do this I take a (String) 
   name from
 a TextInput field which is sent to the getString() method of 
 the 
   class
 called Echo which appends Welcome  to the incoming String  
   returns it
 back. This is displayed by the state 'TargetState'.
 
 1. Here is the mxml file named SimpleRemoteObject.mxml. 
 Please 
   take a
 look at my ActionScript methods as I am new to ActionScript 
 as 
   well.
 
 ?xml version=1.0 encoding=utf-8?
 mx:Application xmlns:mx=http://www.adobe.com/2006/mxml 
   xmlns=*
 layout=absolute
 mx:TraceTarget level=0 /
 mx:Script
 ![CDATA[
 import mx.rpc.events.*; 
 import mx.collections.*;
 import mx.controls.*
 
 private function getNameHandler
 (event:ResultEvent):void
 {
 Result.text = event.result.toString();
 currentState='TargetState';
 }
 
 private function faultHandler(event:FaultEvent):void
 {
 Alert.show

[flexcoders] Re: (Flex20 Beta2): RemoteObject Destination configuration problem

2006-04-25 Thread aejaz_98



Thanks for your reply. I am precompiling the SWFs using flex builder.
The value present in the Additional compiler arguments field is,

-services
C:\tomcat\webapps\flex\WEB-INF\flex\flex-enterprise-services.xml

when I change it to,

-services
C:\tomcat\webapps\flex\WEB-INF\flex\flex-remoting-service.xml

I start getting,

exception 'java.lang.RuntimeException' while setting variable
'compiler.services'. It seems that the only value allowed is
C:\tomcat\webapps\flex\WEB-INF\flex\flex-enterprise-services.xml. I
tried putting,

C:\tomcat\webapps\flex\WEB-INF\flex\flex-enterprise-services.xml;C:\tom\
cat\webapps\flex\WEB-INF\flex\flex-remoting-service.xml

it gave me Unable to open
C:\tomcat\webapps\flex\WEB-INF\flex\flex-enterprise-services.xml;C:\tomc\
at\webapps\flex\WEB-INF\flex\flex-remoting-service.xml

Please let me know what does setting,

-services
 C:\tomcat\webapps\flex\WEB-INF\flex\flex-remoting-service.xml

do  can't it be done manually.

Thanks,
Aejaz

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

 Are you precompiling the SWFs? If so, are you specifying --services
and
 pointing to the configuration file at compile time with either Flex
 Builder compiler command line arguments or mxmlc command line
arguments?












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





  




  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  











[flexcoders] Re: (Flex20 Beta2): RemoteObject Destination configuration problem

2006-04-25 Thread aejaz_98



Hi Peter,

Thanks for your reply. flash-remoting-service.xml is indeed included
in flash-enterprise-services.xml. From your reply, it seemed to me
that I should have the correct destination in flash-remoting-service
BEFORE I attempt to save the project from the Flex builder(which in
turn compiles it when I save the project). Is that correct ?

If so, other than touching the mxml file open in Flex builder,how do I
force Flex builder to compile the swf ? I removed the swf from the
target directory, but Edit-Save of the mxml file is still not
producing the the swf.

Thanks for looking into this.
-Aejaz

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

 You must always point --services to the top level services file, which
 is flex-enterprise-services.xml. The flex-remoting-service.xml is merely
 an include to this top level file (see the service-include tag pointing
 to this and the other services in the top level
 flex-enterprise-services.xml file). It's ok to make changes to the
 flex-remoting-service.xml file as it's included each time by the top
 level file.
 
 That said, if you're changing destination settings in any of the
 configuration and are using the --services option to codegen the correct
 information for you at runtime then you need to recompile the SWFs
 everytime you make a change.
 
 Pete 
 
 -Original Message-
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of aejaz_98
 Sent: Tuesday, April 25, 2006 10:10 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: (Flex20 Beta2): RemoteObject Destination
 configuration problem
 
 Thanks for your reply. I am precompiling the SWFs using flex builder.
 The value present in the Additional compiler arguments field is,
 
 -services
 C:\tomcat\webapps\flex\WEB-INF\flex\flex-enterprise-services.xml
 
 when I change it to,
 
 -services
 C:\tomcat\webapps\flex\WEB-INF\flex\flex-remoting-service.xml
 
 I start getting,
 
 exception 'java.lang.RuntimeException' while setting variable
 'compiler.services'. It seems that the only value allowed is
 C:\tomcat\webapps\flex\WEB-INF\flex\flex-enterprise-services.xml. I
 tried putting,
 
 C:\tomcat\webapps\flex\WEB-INF\flex\flex-enterprise-services.xml;C:\tom
 \
 cat\webapps\flex\WEB-INF\flex\flex-remoting-service.xml
 
 it gave me Unable to open
 C:\tomcat\webapps\flex\WEB-INF\flex\flex-enterprise-services.xml;C:\tomc
 \
 at\webapps\flex\WEB-INF\flex\flex-remoting-service.xml
 
 Please let me know what does setting,
 
 -services
 C:\tomcat\webapps\flex\WEB-INF\flex\flex-remoting-service.xml
 
 do  can't it be done manually.
 
 Thanks,
 Aejaz
 
 --- In flexcoders@yahoogroups.com, Peter Farland pfarland@ wrote:
 
  Are you precompiling the SWFs? If so, are you specifying --services
 and
  pointing to the configuration file at compile time with either Flex 
  Builder compiler command line arguments or mxmlc command line
 arguments?
 
 
 
 
 
 
 
 
 --
 Flexcoders Mailing List
 FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
 Search Archives:
 http://www.mail-archive.com/flexcoders%40yahoogroups.com
 Yahoo! Groups Links











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








  
  
SPONSORED LINKS
  
  
  

Web site design development
  
  
Computer software development
  
  
Software design and development
  
  


Macromedia flex
  
  
Software development best practice
  

   
  







  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  












[flexcoders] Re: (Flex20 Beta2): send failed for RemoteObject

2006-04-25 Thread aejaz_98



Hi Peter,

Thanks for your reply  please disregard my previous message. I
recompiled the application  now I am getting send failed error
message. Can you please take a look at the mxml to see if anything
is wrong. I am very new to mxml  might have had overlooked something
obvious.

Thanks,
Aejaz

?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml xmlns=*
layout=absolute
mx:Script
 ![CDATA[
  import mx.rpc.events.*; 
  import mx.collections.*;
  import mx.controls.*
  
  private function getNameHandler(event:ResultEvent):void
  {
   Result.text = event.result.toString();
   currentState='TargetState';
  }
  
  private function faultHandler(event:FaultEvent):void
 {
  Alert.show(event.fault.faultstring, Error); 
 }
 ]]
/mx:Script
 mx:states 
  mx:State name=TargetState
   mx:RemoveChild child={button1}/
   mx:RemoveChild child={formInput}/
   mx:RemoveChild child={label1}/
   mx:AddChild position=lastChild
mx:Label x=99 y=130 width=265 height=28 id=Result/
   /mx:AddChild
  /mx:State
 /mx:states

 mx:RemoteObject id=SendStringBack destination=EchoString
showBusyCursor=true fault=faultHandler(event)
  mx:method name=getString result=getNameHandler(event)
   mx:arguments
str
{formInput.text}
/str
   /mx:arguments
  /mx:method
 /mx:RemoteObject
 mx:TextInput x=119 y=129 id=formInput/
 mx:Button x=119 y=170 label=Submit fontSize=13 id=button1
click=SendStringBack.getString.send()/
 mx:Label x=119 y=86 text=What is your name ? width=160
fontSize=15 id=label1/ 
/mx:Application



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

 You must always point --services to the top level services file, which
 is flex-enterprise-services.xml. The flex-remoting-service.xml is merely
 an include to this top level file (see the service-include tag pointing
 to this and the other services in the top level
 flex-enterprise-services.xml file). It's ok to make changes to the
 flex-remoting-service.xml file as it's included each time by the top
 level file.
 
 That said, if you're changing destination settings in any of the
 configuration and are using the --services option to codegen the correct
 information for you at runtime then you need to recompile the SWFs
 everytime you make a change.
 
 Pete 
 
 -Original Message-
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of aejaz_98
 Sent: Tuesday, April 25, 2006 10:10 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: (Flex20 Beta2): RemoteObject Destination
 configuration problem
 
 Thanks for your reply. I am precompiling the SWFs using flex builder.
 The value present in the Additional compiler arguments field is,
 
 -services
 C:\tomcat\webapps\flex\WEB-INF\flex\flex-enterprise-services.xml
 
 when I change it to,
 
 -services
 C:\tomcat\webapps\flex\WEB-INF\flex\flex-remoting-service.xml
 
 I start getting,
 
 exception 'java.lang.RuntimeException' while setting variable
 'compiler.services'. It seems that the only value allowed is
 C:\tomcat\webapps\flex\WEB-INF\flex\flex-enterprise-services.xml. I
 tried putting,
 
 C:\tomcat\webapps\flex\WEB-INF\flex\flex-enterprise-services.xml;C:\tom
 \
 cat\webapps\flex\WEB-INF\flex\flex-remoting-service.xml
 
 it gave me Unable to open
 C:\tomcat\webapps\flex\WEB-INF\flex\flex-enterprise-services.xml;C:\tomc
 \
 at\webapps\flex\WEB-INF\flex\flex-remoting-service.xml
 
 Please let me know what does setting,
 
 -services
 C:\tomcat\webapps\flex\WEB-INF\flex\flex-remoting-service.xml
 
 do  can't it be done manually.
 
 Thanks,
 Aejaz
 
 --- In flexcoders@yahoogroups.com, Peter Farland pfarland@ wrote:
 
  Are you precompiling the SWFs? If so, are you specifying --services
 and
  pointing to the configuration file at compile time with either Flex 
  Builder compiler command line arguments or mxmlc command line
 arguments?
 
 
 
 
 
 
 
 
 --
 Flexcoders Mailing List
 FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
 Search Archives:
 http://www.mail-archive.com/flexcoders%40yahoogroups.com
 Yahoo! Groups Links











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








  
  
SPONSORED LINKS
  
  
  

Web site design development
  
  
Computer software development
  
  
Software design and development
  
  


Macromedia flex
  
  
Software development best practice
  

   
  







  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  











[flexcoders] Re: (Flex20 Beta2): send failed for RemoteObject

2006-04-25 Thread aejaz_98



The detailed error message in this case is,

Channel.Connect.Failed error
Netconnection.Call.Failed:HTTP:Failed

My flex-remoting-service.xml looks as follows,

 default-channels
 channel ref=my-amf/
 /default-channels

 destination id=EchoString
 properties
 sourcesamples.SimpleRemoteObject.Echo/source
 /properties
 /destination
 
 the channel my-amf is defined in flex-enterprise-services.xml as
follows, 

 channel-definition id=my-amf
class=mx.messaging.channels.AMFChannel
 endpoint
uri=http://{server.name}:{server.port}/{context.root}/messagebroker/amf
class=flex.messaging.endpoints.AMFEndpoint/
 properties
 polling-enabledfalse/polling-enabled
 /properties
 /channel-definition

Thanks,
Aejaz

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

 Hi Peter,
 
 Thanks for your reply  please disregard my previous message. I
 recompiled the application  now I am getting send failed error
 message. Can you please take a look at the mxml to see if anything
 is wrong. I am very new to mxml  might have had overlooked something
 obvious.
 
 Thanks,
 Aejaz
 
 ?xml version=1.0 encoding=utf-8?
 mx:Application xmlns:mx=http://www.adobe.com/2006/mxml xmlns=*
 layout=absolute
 mx:Script
  ![CDATA[
   import mx.rpc.events.*; 
   import mx.collections.*;
   import mx.controls.*
   
   private function getNameHandler(event:ResultEvent):void
  {
   Result.text = event.result.toString();
   currentState='TargetState';
  }
  
   private function faultHandler(event:FaultEvent):void
 {
  Alert.show(event.fault.faultstring, Error); 
 }
  ]]
 /mx:Script
  mx:states 
   mx:State name=TargetState
mx:RemoveChild child={button1}/
mx:RemoveChild child={formInput}/
mx:RemoveChild child={label1}/
mx:AddChild position=lastChild
 mx:Label x=99 y=130 width=265 height=28 id=Result/
/mx:AddChild
   /mx:State
  /mx:states
 
  mx:RemoteObject id=SendStringBack destination=EchoString
 showBusyCursor=true fault=faultHandler(event)
   mx:method name=getString result=getNameHandler(event)
mx:arguments
 str
 {formInput.text}
 /str
/mx:arguments
   /mx:method
  /mx:RemoteObject
  mx:TextInput x=119 y=129 id=formInput/
  mx:Button x=119 y=170 label=Submit fontSize=13 id=button1
 click=SendStringBack.getString.send()/
  mx:Label x=119 y=86 text=What is your name ? width=160
 fontSize=15 id=label1/ 
 /mx:Application
 
 
 
 --- In flexcoders@yahoogroups.com, Peter Farland pfarland@ wrote:
 
  You must always point --services to the top level services file, which
  is flex-enterprise-services.xml. The flex-remoting-service.xml is
merely
  an include to this top level file (see the service-include tag
pointing
  to this and the other services in the top level
  flex-enterprise-services.xml file). It's ok to make changes to the
  flex-remoting-service.xml file as it's included each time by the top
  level file.
  
  That said, if you're changing destination settings in any of the
  configuration and are using the --services option to codegen the
correct
  information for you at runtime then you need to recompile the SWFs
  everytime you make a change.
  
  Pete 
  
  -Original Message-
  From: flexcoders@yahoogroups.com
[mailto:[EMAIL PROTECTED] On
  Behalf Of aejaz_98
  Sent: Tuesday, April 25, 2006 10:10 AM
  To: flexcoders@yahoogroups.com
  Subject: [flexcoders] Re: (Flex20 Beta2): RemoteObject Destination
  configuration problem
  
  Thanks for your reply. I am precompiling the SWFs using flex builder.
  The value present in the Additional compiler arguments field is,
  
  -services
  C:\tomcat\webapps\flex\WEB-INF\flex\flex-enterprise-services.xml
  
  when I change it to,
  
  -services
  C:\tomcat\webapps\flex\WEB-INF\flex\flex-remoting-service.xml
  
  I start getting,
  
  exception 'java.lang.RuntimeException' while setting variable
  'compiler.services'. It seems that the only value allowed is
  C:\tomcat\webapps\flex\WEB-INF\flex\flex-enterprise-services.xml. I
  tried putting,
  
 
C:\tomcat\webapps\flex\WEB-INF\flex\flex-enterprise-services.xml;C:\tom
  \
  cat\webapps\flex\WEB-INF\flex\flex-remoting-service.xml
  
  it gave me Unable to open
 
C:\tomcat\webapps\flex\WEB-INF\flex\flex-enterprise-services.xml;C:\tomc
  \
  at\webapps\flex\WEB-INF\flex\flex-remoting-service.xml
  
  Please let me know what does setting,
  
  -services
  C:\tomcat\webapps\flex\WEB-INF\flex\flex-remoting-service.xml
  
  do  can't it be done manually.
  
  Thanks,
  Aejaz
  
  --- In flexcoders@yahoogroups.com, Peter Farland pfarland@ wrote:
  
   Are you precompiling the SWFs? If so, are you specifying --services
  and
   pointing to the configuration file at compile time with either Flex 
   Builder compiler command line arguments or mxmlc command line
  arguments?
  
  
  
  
  
  
  
  
  --
  Flexcoders Mailing List
  FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
  Search Archives:
  http://www.mail-archive.com/flexcoders%40yahoogroups.com
  Yahoo! Groups Links

[flexcoders] Re: (Flex20 Beta2): send failed for RemoteObject

2006-04-25 Thread aejaz_98



Thanks Peter. Please let me know how exactly to do that. Do you mean
add --context.root C:\tomcat\webapps\flex while starting tomcat i.e.

catalina start --context.root C:\tomcat\webapps\flex

Is that right ?

Thanks,
Aejaz

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

 Ah, yes, you need to specify --context.root on the command line as the
 client can't tell what the context root is (i.e. because you can have
 the default context root  it can't make assumptions as to whether the
 first level under the webroot is a subdirectory or a context root).
 
 
 
 -Original Message-
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of aejaz_98
 Sent: Tuesday, April 25, 2006 1:59 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: (Flex20 Beta2): send failed for RemoteObject
 
 The detailed error message in this case is,
 
 Channel.Connect.Failed error
 Netconnection.Call.Failed:HTTP:Failed
 
 My flex-remoting-service.xml looks as follows,
 
 default-channels
 channel ref=my-amf/
 /default-channels
 
 destination id=EchoString
 properties
 sourcesamples.SimpleRemoteObject.Echo/source
 /properties
 /destination
 
  the channel my-amf is defined in flex-enterprise-services.xml as
 follows, 
 
 channel-definition id=my-amf
 class=mx.messaging.channels.AMFChannel
 endpoint
 uri=http://{server.name}:{server.port}/{context.root}/messagebroker/amf
 
 class=flex.messaging.endpoints.AMFEndpoint/
 properties
 polling-enabledfalse/polling-enabled
 /properties
 /channel-definition
 
 Thanks,
 Aejaz
 
 --- In flexcoders@yahoogroups.com, aejaz_98 aejaz_98@ wrote:
 
  Hi Peter,
  
  Thanks for your reply  please disregard my previous message. I 
  recompiled the application  now I am getting send failed error 
  message. Can you please take a look at the mxml to see if anything is 
  wrong. I am very new to mxml  might have had overlooked something 
  obvious.
  
  Thanks,
  Aejaz
  
  ?xml version=1.0 encoding=utf-8? mx:Application 
  xmlns:mx=http://www.adobe.com/2006/mxml xmlns=*
  layout=absolute
  mx:Script
   ![CDATA[
import mx.rpc.events.*; 
import mx.collections.*;
import mx.controls.*

private function getNameHandler(event:ResultEvent):void
   {
Result.text = event.result.toString();
currentState='TargetState';
   }
   
private function faultHandler(event:FaultEvent):void
  {
   Alert.show(event.fault.faultstring, Error); 
  }
   ]]
  /mx:Script
   mx:states 
mx:State name=TargetState
 mx:RemoveChild child={button1}/
 mx:RemoveChild child={formInput}/
 mx:RemoveChild child={label1}/
 mx:AddChild position=lastChild
  mx:Label x=99 y=130 width=265
 height=28 id=Result/
 /mx:AddChild
/mx:State
   /mx:states
  
   mx:RemoteObject id=SendStringBack destination=EchoString
  showBusyCursor=true fault=faultHandler(event)
mx:method name=getString
 result=getNameHandler(event)
 mx:arguments
  str
  {formInput.text}
  /str
 /mx:arguments
/mx:method
   /mx:RemoteObject
   mx:TextInput x=119 y=129 id=formInput/
   mx:Button x=119 y=170 label=Submit fontSize=13
 id=button1
  click=SendStringBack.getString.send()/
   mx:Label x=119 y=86 text=What is your name ? width=160
  fontSize=15 id=label1/ 
  /mx:Application
  
  
  
  --- In flexcoders@yahoogroups.com, Peter Farland pfarland@ wrote:
  
   You must always point --services to the top level services file, 
   which is flex-enterprise-services.xml. The flex-remoting-service.xml
 
   is
 merely
   an include to this top level file (see the service-include tag
 pointing
   to this and the other services in the top level 
   flex-enterprise-services.xml file). It's ok to make changes to the 
   flex-remoting-service.xml file as it's included each time by the top
 
   level file.
   
   That said, if you're changing destination settings in any of the 
   configuration and are using the --services option to codegen the
 correct
   information for you at runtime then you need to recompile the SWFs 
   everytime you make a change.
   
   Pete
   
   -Original Message-
   From: flexcoders@yahoogroups.com
 [mailto:[EMAIL PROTECTED] On
   Behalf Of aejaz_98
   Sent: Tuesday, April 25, 2006 10:10 AM
   To: flexcoders@yahoogroups.com
   Subject: [flexcoders] Re: (Flex20 Beta2): RemoteObject Destination 
   configuration problem
   
   Thanks for your reply. I am precompiling the SWFs using flex
 builder.
   The value present in the Additional compiler arguments field is,
   
   -services
   C:\tomcat\webapps\flex\WEB-INF\flex\flex-enterprise-services.xml
   
   when I change it to,
   
   -services
   C:\tomcat\webapps\flex\WEB-INF\flex\flex-remoting-service.xml
   
   I start getting,
   
   exception 'java.lang.RuntimeException' while setting variable 
   'compiler.services'. It seems that the only value allowed is 
   C:\tomcat\webapps\flex\WEB-INF\flex\flex-enterprise-services.xml. 
   I tried putting,
   
  
 C:\tomcat

[flexcoders] Re: (Flex20 Beta2): send failed for RemoteObject

2006-04-25 Thread aejaz_98



Hi Peter,Thanks for taking the time to patiently answer my questions. Unfortunately, I am still unable to proceed. I changed the following line(in flex-enterprise-services.xml under channel definition for my-amf),endpoint uri="http://{server.name}:{server.port}/{context.root}/messagebroker/amf" class="flex.messaging.endpoints.AMFEndpoint"/toendpoint uri="http://{server.name}:{server.port}/flex/messagebroker/amf" class="flex.messaging.endpoints.AMFEndpoint"/as the URL to which I go form the browser is http://localhost:8080/flex/SimpleRemoteObject/SimpleRemoteObject.html there is no change in behavior. I must have not understood you correctly. Can you please clarify if possible on how to set context root step by step.Thanks again,Aejaz--- In flexcoders@yahoogroups.com, "Peter Farland" [EMAIL PROTECTED] wrote: Sorry, the J2EE context root as it would appear in the URL (i.e. this value will replace the token {context.root} at compile time based on the value of --context-root).  e.g.  --context-root=/dev  Note that the other two tokens in the endpoint URL, {server.name} and {server.port} will be known at runtime if the SWF is loaded via a URL so these are replaced at runtime based on how the SWF is loaded.  -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of aejaz_98 Sent: Tuesday, April 25, 2006 3:12 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: (Flex20 Beta2): send failed for RemoteObject  Thanks Peter. Please let me know how exactly to do that. Do you mean add --context.root C:\tomcat\webapps\flex while starting tomcat i.e.  catalina start --context.root C:\tomcat\webapps\flex  Is that right ?  Thanks, Aejaz  --- In flexcoders@yahoogroups.com, "Peter Farland" pfarland@ wrote:   Ah, yes, you need to specify --context.root on the command line as the   client can't tell what the context root is (i.e. because you can have   the default context root "" it can't make assumptions as to whether   the first level under the webroot is a subdirectory or a context root). -Original Message-  From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED]   On Behalf Of aejaz_98  Sent: Tuesday, April 25, 2006 1:59 PM  To: flexcoders@yahoogroups.com  Subject: [flexcoders] Re: (Flex20 Beta2): send failed for RemoteObjectThe detailed error message in this case is,Channel.Connect.Failed error  Netconnection.Call.Failed:HTTP:FailedMy flex-remoting-service.xml looks as follows,default-channels  channel ref="my-amf"/  /default-channelsdestination id="EchoString"  properties  sourcesamples.SimpleRemoteObject.Echo/source  /properties  /destination   the channel "my-amf" is defined in flex-enterprise-services.xml as   follows,channel-definition id="my-amf"  class="mx.messaging.channels.AMFChannel"  endpoint  uri="http://{server.name}:{server.port}/{context.root}/messagebroker/a  mf  "  class="flex.messaging.endpoints.AMFEndpoint"/  properties  polling-enabledfalse/polling-enabled  /properties  /channel-definitionThanks,  Aejaz--- In flexcoders@yahoogroups.com, "aejaz_98" aejaz_98@ wrote: Hi Peter,  Thanks for your reply  please disregard my previous message. Irecompiled the application  now I am getting "send failed" errormessage. Can you please take a look at the mxml to see if anythingis wrong. I am very new to mxml  might have had overlookedsomething obvious.  Thanks,   Aejaz  ?xml version="1.0" encoding="utf-8"? mx:Applicationxmlns:mx="http://www.adobe.com/2006/mxml" xmlns="*"   layout="absolute"   mx:Script   	![CDATA[   		import mx.rpc.events.*;		import mx.collections.*;   		import mx.controls.*   	   	private function getNameHandler(event:ResultEvent):void   	{   		Result.text = event.result.toString();   		currentState='TargetState';   	}   	   		private function faultHandler(event:FaultEvent):void   {   	Alert.show(event.fault.faultstring, "Error");	   }   	]]   /mx:Script   	mx:states		mx:State name="TargetState"   			mx:RemoveChild child="{button1}"/   			mx:RemoveChild child="{formInput}"/   			mx:RemoveChild child="{label1}"/   			mx:AddChild position="lastChild"   mx:Label x="99" y="130" width="265"  height="28" id="Result"/   			/mx:AddChild   		/mx:State   	/mx:states  	mx:RemoteObject id="SendStringBack" destination="EchoString"   showBusyCursor="true" fault="faultHandler(event)"   		mx:method name="getString"  resu

[flexcoders] Re: (Flex20 Beta2): send failed for RemoteObject

2006-04-25 Thread aejaz_98



Thanks Peter, 

I am loading the SWF from the following URL,

http://localhost:8080/flex/SimpleRemoteObject/SimpleRemoteObject.html

Do I still need crossdomain.xml as Tomcat is running locally.
If so what will this file contain  in which directory I should
create it.

Thanks,
Aejaz

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

 Are you loading your SWF from http://localhost:8080? Or are you using
 the standalone player by, say, double clicking on the SWF and opening it
 using SAFlashPlayer.exe?
 
 Note that if the SWF isn't loaded from the same domain then you'll need
 a crossdomain.xml file in the webroot of the domain that you're trying
 to access (i.e. localhost:8080).
 
 Pete
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of aejaz_98
 Sent: Tuesday, April 25, 2006 4:06 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: (Flex20 Beta2): send failed for RemoteObject
 
 
 Hi Peter,
 
 Thanks for taking the time to patiently answer my questions.
 Unfortunately, I am still unable to proceed. I changed the following
 line(in flex-enterprise-services.xml under channel definition for
 my-amf),
 
 endpoint
 uri=http://{server.name}:{server.port}/{context.root}/messagebroker/amf
  class=flex.messaging.endpoints.AMFEndpoint/
 
 to
 
 endpoint
 uri=http://{server.name}:{server.port}/flex/messagebroker/amf
 class=flex.messaging.endpoints.AMFEndpoint/
 
 as the URL to which I go form the browser is 
 
 http://localhost:8080/flex/SimpleRemoteObject/SimpleRemoteObject.html
 
  there is no change in behavior. 
 
 I must have not understood you correctly. Can you please clarify if
 possible on how to set context root step by step.
 
 Thanks again,
 Aejaz
 
 
 --- In flexcoders@yahoogroups.com, Peter Farland pfarland@ wrote:
 
  Sorry, the J2! EE context root as it would appear in the URL (i.e.
 this
  value will replace the token {context.root} at compile time based on
 the
  value of --context-root).
  
  e.g.
  
  --context-root=/dev
  
  Note that the other two tokens in the endpoint URL, {server.name} and
  {server.port} will be known at runtime if the SWF is loaded via a URL
 so
  these are replaced at runtime based on how the SWF is loaded.
  
  -Original Message-
  From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED]
 On
  Behalf Of aejaz_98
  Sent: Tuesday, April 25, 2006 3:12 PM
  To: flexcoders@yahoogroups.com
  Subject: [flexcoders] Re: (Flex20 Beta2): send failed for RemoteObject
  
  Thanks Peter. Please let me know how exactly to do that. Do you mean
 add
  --context.root C:\tomcat\webapps\flex while starting tomcat i.e.
  
  catalina start --context! .root C:\tomcat\webapps\flex
  
  Is that right ? 
  Thanks,
  Aejaz
  
  --- In flexcoders@yahoogroups.com, Peter Farland pfarland@ wrote:
  
   Ah, yes, you need to specify --context.root on the command line as
 the
  
   client can't tell what the context root is (i.e. because you can
 have 
   the default context root  it can't make assumptions as to whether 
   the first level under the webroot is a subdirectory or a context
  root).
   
   
   
   -Original Message-
   From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED]
 
   On Behalf Of aejaz_98
   Sent: Tuesday, April 25, 2006 1:59 PM
   To: flexcoders@yahoogroups.com
   Subject: [flexcoders] Re: (Flex20 Beta2): send failed for
 RemoteObject
   
   The detailed error message in this case is,
   
   Channel.Connect.Failed error 
 Netconnection.Call.Failed:HTTP:Failed
   
   My flex-remoting-service.xml looks as follows,
   
   default-channels
   channel ref=my-amf/
   /default-channels
   
   destination id=EchoString
   properties
   sourcesamples.SimpleRemoteObject.Echo/source
   /properties
   /destination
   
the channel my-amf is defined in flex-enterprise-services.xml as
 
   follows,
   
   channel-definition id=my-amf
   class=mx.messaging.channels.AMFChannel
   endpoint
  
 uri=http://{server.name}:{server.port}/{context.root}/messagebroker/a
   mf
   
   class=flex.messaging.e! ndpoints.AMFEndpoint/
   proper! ties 
   polling-enabledfalse/polling-enabled
   /properties
   /channel-definition
   
   Thanks,
   Aejaz
   
   --- In flexcoders@yahoogroups.com, aejaz_98 aejaz_98@ wrote:
   
Hi Peter,

Thanks for your reply  please disregard my previous message. I 
recompiled the application  now I am getting send failed error 
message. Can you please take a look at the mxml to see if anything
 
is wrong. I am very new to mxml  might have had overlooked 
something obvious.

Thanks,
Aejaz

?xml version=1.0 encoding=utf-8? mx:Application 
xmlns:mx=http://www.ado! be.com/2006/mxml xmlns=*
layout=absolute
mx:Script
![CDATA[
import mx.rpc.events.*; 
import mx.collections.*;
import mx.controls.*

private function getNameHandler(event:ResultEvent):void
{
Result.text

[flexcoders] (Flex20b2) RemoteObject access problem

2006-04-25 Thread aejaz_98



Hi,I have posted a couple of messages on calling a method on a Java object using mx:RemoteObject tag but so far I haven't been successful. With help from Peter  Suresh I did proceed a little bit further but I am still unable to successfully call the method on the server side object. Since I described the problem in bits  pieces before, I think that I may have missed some step(s) which I don't know about. Here is what I have done step by step. Please let me know if I am doing anything wrong or not doing something.Basically what I wanted to do was to verify the connectivity from the
browser side to a simple Java class on the back end using RemoteObject
tag before doing anything major. To do this I take a (String) name from
a TextInput field which is sent to the getString() method of the class
called Echo which appends "Welcome " to the incoming String 
returns it back. This is displayed by the state 'TargetState'.1.
Here is the mxml file named SimpleRemoteObject.mxml. Please take a look
at my ActionScript methods as I am new to ActionScript as well.?xml version="1.0" encoding="utf-8"?mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="*"
 layout="absolute"mx:TraceTarget level="0" /mx:Script ![CDATA[  import mx.rpc.events.*;   import mx.collections.*;  import mx.controls.*private function getNameHandler(event:ResultEvent):void  {   Result.text = event.result.toString();   currentState='TargetState';  }private function faultHandler(event:FaultEvent):void { 
 Alert.show(event.fault.faultstring, "Error");  Alert.show(event.fault.faultDetail, "Error");  } ]]/mx:Script mx:states   mx:State name="TargetState"   mx:RemoveChild child="{button1}"/   mx:RemoveChild child="{formInput}"/   mx:RemoveChild child="{label1}"/   mx:AddChild position="lastChild"mx:Label x="99" y="130" width="265" height="28" id="Result"/
   /mx:AddChild  /mx:State /mx:states mx:RemoteObject id="sendStringBack" destination="EchoString" showBusyCursor="true" fault="faultHandler(event)"  mx:method name="getString" result="getNameHandler(event)"   mx:argumentsstr{formInput.text}/str   /mx:arguments  /mx:method /mx:RemoteObject
 mx:TextInput x="119" y="129" id="formInput"/ mx:Button x="119" y="170" label="Submit" fontSize="13" id="button1" click="sendStringBack.getString.send()"/ mx:Label x="119" y="86" text="What is your name ?" width="160" fontSize="15" id="label1"/ /mx:ApplicationFor
this project I defined the Flex root folder at
C:\tomcat-5.5.9\webapps\flex  flex server URL to
http://localhost:8080/flex/.2. Defined the destination EchoString in C:\tomcat-5.5.9\webapps\flex\WEB-INF\flex\flex-remoting-service.xml as follows, adapters
adapter-definition id="java-object"
class="flex.messaging.services.remoting.adapters.JavaAdapter"
default="true"/ /adapters
 default-channels channel ref="my-amf"/ /default-channels destination id="EchoString" properties sourcesamples.SimpleRemoteObject.Echo/source /properties /destination3.
Saved the mxml file in Flex Builder which created
C:\tomcat-5.5.9\webapps\flex\SimpleRemoteObject directory  put the
HTML, SWFs  _javascript_ files in it. 4.
Compiled the Java class called Echo.java  put Echo.class in
C:\tomcat-5.5.9\webapps\flex\WEB-INF\classes\samples\SimpleRemoteObject.package
 samples.SimpleRemoteObject;public class Echo { public Echo(){ } public String getString(String str){ System.out.println("In Echo::getString(), got " + str); return "Welcome " + str ; }}5. Started tomcat  went to,http://localhost:8080/flex/SimpleRemoteObject/SimpleRemoteObject.html6. First page got painted fine, input a name  clicked on 'Submit'7. I get Channel.Connect.Failed error.
 NetConnection.Call.Failed error:HTTP:Failed in the Alert box.C:\tomcat-5.5.9\webapps\flex\WEB-INF\flex\flex-enterprise-services.xml has, channel-definition id="my-amf" class="mx.messaging.channels.AMFChannel"
endpoint
uri="http://{server.name}:{server.port}/{context.root}/messagebroker/amf"
class="flex.messaging.endpoints.AMFEndpoint"/ properties polling-enabledfalse/polling-enabled /properties /channel-definitionThanks,Aejaz






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





  




  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  









[flexcoders] (Flex20 Beta2): RemoteObject Destination configuration problem

2006-04-24 Thread aejaz_98



Hi,I have created a very simple 2 state mxml file(attached below) where you submit a name which is passed to a RemoteObject which appends "Welcome "to the input string  returns the whole string back.The java class which does this is,package samples.SimpleRemoteObject;public class Echo { public Echo(){ } public String getString(String str){ return "Welcome " + str ; }}I have added the following to flex-remoting-service.xml underc:\tomcat\webapps\flex\WEB-INF\flex, destination id="EchoString" properties sourcesamples.SimpleRemoteObject.Echo/source /properties /destinationThe default-channels  adapters definition was already there.I also put Echo.class under C:\tomcat\webapps\flex\WEB-INF\classes\samples\SimpleRemoteObject.After Tomcat(v5.5.9) is started, it correctly loads the initial pageat http://localhost:8080/flex/SimpleRemoteObject/SimpleRemoteObject.htmlbut after I click on submit, I always get "Error: Unknown destination 'EchoString'". I have tried renaming the destination names but there is no change in behavior.Please let me know what am I doing wrong. All the samples are running finethough. This is my first attempt on doing something with Flex.Thanks,Aejaz?xml version="1.0" encoding="utf-8"?mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="*" layout="absolute"mx:Script ![CDATA[  import mx.rpc.events.*;  import mx.collections.*;  import mx.controls.*private function getNameHandler(event:ResultEvent):void  {   Result.text = event.result.toString();   currentState='TargetState';  }private function faultHandler(event:FaultEvent):void {  Alert.show(event.fault.faultstring, "Error");  } ]]/mx:Script mx:states  mx:State name="TargetState"   mx:RemoveChild child="{button1}"/   mx:RemoveChild child="{formInput}"/   mx:RemoveChild child="{label1}"/   mx:AddChild position="lastChild"mx:Label x="99" y="130" width="265" height="28" id="Result"/   /mx:AddChild  /mx:State /mx:states mx:RemoteObject id="SendStringBack" destination="EchoString" showBusyCursor="true" fault="faultHandler(event)"  mx:method name="getString" result="getNameHandler(event)"   mx:argumentsstr{formInput.text}/str   /mx:arguments  /mx:method /mx:RemoteObject mx:TextInput x="119" y="129" id="formInput"/ mx:Button x="119" y="170" label="Submit" fontSize="13" id="button1" click="SendStringBack.getString.send()"/ mx:Label x="119" y="86" text="What is your name ?" width="160" fontSize="15" id="label1"/ /mx:Application






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





  




  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.