true....
that was a typo in my example.
I seem to have got it going by doing an "init()" on "bob"
I *think* this may be something to do with that my root MXML element
is "<mx:Box>"
What do use for the root element if you are writing a MXML file as a class?
On 9/21/05, Peter Farland <[EMAIL PROTECTED]> wrote:
> isAdmin is a function... So you need to use parentheses () to invoke it,
> even when there are no arguments.
>
>
> public function loadPerms():Void
> {
> srvPermissions.isAdmin()
>
> }
>
>
> -----Original Message-----
> From: [email protected] [mailto:[EMAIL PROTECTED] On
> Behalf Of mehere_straker
> Sent: Monday, September 19, 2005 11:13 PM
> To: [email protected]
> Subject: [flexcoders] Remote objects and when they exist
>
> Hi,
>
> I am quite new to Flex and action script, but have a problem I hope
> someone out there can help with...
>
> I have a "class" which is a "mxml" file called "Permissions".
> The idea is that when the Flex app starts up, it goes off to a
> Coldfusion CFC via a RemoteObject and gets the various rights of the
> current loggin and loads them in to an application wide scope to be
> avalible to the application.
>
> Example Code:
> ======================================
> <!-- in the root mxml file -->
> function appInit():Void{
> var bob = new com.classes.Permissions;
> _global.permissions = bob.loadPerms(); }
> ======================================
> <!-- in the Permissions.mxml -->
> <mx:RemoteObject id="srvPermissions"
> source="[my source]"
> fault="srvFaultHandle(event.fault.faultstring)"
> showBusyCursor="true">
> <mx:method name="isAdmin" result="isAdminResult(event)"/>
> </mx:RemoteObject> <mx:Script>
> <![CDATA[
>
> public function loadPerms():Void{
> srvPermissions.isAdmin
> }
> private function isAdminResult(event):Void{
> trace("function isAdminResult(event) -- You got a Result!");
> }
> private function srvFaultHandle(message:String):Void{
> trace("ERROR:: " + message);
> }
> ]]>
> </mx:Script>
> =======================================
>
> From what I can see, putting various traces all over the place, even
> though I have created a object of class "permissions", it doesn't exist,
> and when I (try) and fire the remote object, nothing happens, not in the
> error handler or event handler.
>
> Can anyone see what I am doing wrong?
>
>
>
>
>
> --
> 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
>
>
>
> ________________________________
> 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.
>
> ________________________________
>
------------------------ Yahoo! Groups Sponsor --------------------~-->
Most low income households are not online. Help bridge the digital divide today!
http://us.click.yahoo.com/cd_AJB/QnQLAA/TtwFAA/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/