Re: [flexcoders] Local Windows services calls from Air

2009-12-31 Thread Sam Lai
Using the ability to call operating-system specific apps in AIR 2.0
(currently in Beta), you can do that either by writing your own
Windows app, or using VBScript/PowerShell.

2009/12/31 method_air :
> Is there a way to call out to a local Windows service (ie COM etc) from 
> within Air?
>
> Thanks,
>
> Philip
>
>
>
> 
>
> --
> Flexcoders Mailing List
> FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> Alternative FAQ location: 
> https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847
> Search Archives: 
> http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links
>
>
>
>


[flexcoders] Re: Creation Complete flag?

2009-12-31 Thread Amy


--- In flexcoders@yahoogroups.com, "dfalling"  wrote:
>
> Is there a publicly-exposed property on components that can be inspected to 
> determine if they have finished creation yet?  I know I can listen for 
> creationComplete, but what can I do if it may have already been fired?
>

Check out http://www.insideria.com/2009/11/handling-delayed-instantiation.html



[flexcoders] Getting Channel Ping Failed Error after disabling Browser cookies using Blazeds.

2009-12-31 Thread ragini
Hello All,

I am using Flex 3.3 , Blazeds 3.3.0.9520 in my application.When I disable the 
browser cookies I got the errors in fault handler of the Remote Object.

Errors in Detail :

1] [FaultEvent fault=[RPC Fault faultString="Detected 
duplicate HTTP-based FlexSessions, generally due to the remote host disabling 
session cookies. Session cookies must be enabled to manage the client 
connection correctly." 
faultCode="Server.Processing.DuplicateSessionDetected" 
faultDetail="null"] messageId="74FCAA7C-6508-76B5-
8BD1-AB2694B1D08E" type="fault" bubbles=false 
cancelable=true eventPhase=2]


2] [FaultEvent fault=[RPC Fault faultString="Send failed" 
faultCode="Client.Error.MessageSend" 
faultDetail="Channel.Ping.Failed error null url: 
'http://192.168.1.76:8080/messagebroker/amf'"] 
messageId="963746F4-07A8-B1B6-09D4-DEE3BF9EDCD3" 
type="fault" bubbles=false cancelable=true 
eventPhase=2]

Is there any way to use Blazeds by disabling the browser cookies?
If you want more information , please let me know.

Awaiting for prompt reply!

Thanks and Regards,
Ragini.




Re: [flexcoders] Selecting xml nodes in a tree

2009-12-31 Thread Jeroen Beckers
I fine-tuned it to the following (some lines are commented, just to give a
complete example for future google-visitors)

private function displayTreeNode(node:XML):void
{
var t:Number = getTimer();
//expand all the parents
expandToTop(node.parent());
//item is now selectable
tree.selectedItem = node;
//open the item itself
//tree.expandItem(node,true,false);


//make the node visible (=position scrollbar)
var idx:int = tree.getItemIndex(node);
tree.scrollToIndex(idx);
//tree.firstVisibleItem = node;

trace("Looking up the item in the tree took " + (getTimer() - t)
+ "ms");
}

private function expandToTop(node:XML):void
{
//open if it's not open yet
//if(!tree.isItemOpen(node)) tree.expandItem(node, true);
tree.expandItem(node, true);

//if there's a parent, continue recursion
if(node.parent()) expandToTop(node.parent());
}

The only problem now is that my treeData is really big and the E4X statement
takes about 1200ms on average. Updating the tree takes up another 800ms.
I'll have to optimize the crap out of this :).



On Wed, Dec 30, 2009 at 5:21 PM, Jim Hayes  wrote:

>
>
> It strikes me now that if it meets an open node on the way up the tree it
> will stop there (and probably shouldn't)
> You might want to allow for that / fix it.
> It's something that I put in as a feature request that was subsequently
> depreciated because when the client saw it in practice they decided they
> didn't like it after all!
> So it's not all that well tested I'm afraid.
>
>
> -Original Message-
> From: flexcoders@yahoogroups.com  on behalf
> of Jeroen Beckers
> Sent: Wed 12/30/2009 3:20 PM
> To: flexcoders@yahoogroups.com 
> Subject: Re: [flexcoders] Selecting xml nodes in a tree
>
> Hi Jim,
>
> I think that'll be enough to get me going, thanks! :).
>
> And if not, you'll hear from me soon enough :).
>
> Greets,
> Dauntless
> On Wed, Dec 30, 2009 at 3:36 PM, Jim Hayes 
> >
> wrote:
>
> >
> >
> > I've used something like this (which is possibly a bit flaky, I admit. I
> > wrote this a long time ago and haven't revisited it since).
> >
> > private function displayTreeNode(node:XML):void
> > {
> > expandTreeParents(node);
> > movieTree.selectedItem = node;
> > movieTree.expandItem(node,true,false);
> > var idx:int = movieTree.getItemIndex(node);
> > movieTree.scrollToIndex(idx);
> > movieTree.firstVisibleItem = node;
> > }
> >
> > private function expandTreeParents(node:XML):void {
> > if (node && !movieTree.isItemOpen(node)) {
> > movieTree.expandItem(node, true);
> > expandTreeParents(node.parent());
> > }
> > }
> >
> > where movieTree is my tree instance.
> > You need to traverse up the tree from the node you want to display and
> open
> > each item ( expandTreeParents() above ),
> > then select the node you want to display. This may not be visible even
> > then, hence the scroll to index stuff.
> >
> > Hope that's enough to get you going, in any case.
> >
> >
> > -Original Message-
> > From: flexcoders@yahoogroups.com  40yahoogroups.com> on behalf
> > of thedauntless_ff
> > Sent: Wed 12/30/2009 1:31 PM
> > To: flexcoders@yahoogroups.com  40yahoogroups.com>
> > Subject: [flexcoders] Selecting xml nodes in a tree
> >
> > Hi,
> >
> > My situation:
> > - 1 Tree component (id=tree)
> > - 1 XMLListCollection as a dataprovider for the tree (id=treeData)
> > - 1 String, a url, that has to be found & selected.
> >
> > My XMLListCollection looks like this:
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> >
> > Etc. All nodes are named 'page' and have a href property.
> >
> > What I need now, is a way to select the node in the tree for the given
> url.
> > For example, all nodes are collapsed and I want to select the node with
> > href=url4. How can I do this?
> >
> > This is what I tried:
> >
> > var t:XMLListCollection = this.treeData;
> > var url:String = "myURL";
> > for(var i:Number = 0; i > {
> > //this works, nodes now contains a list of xml items with the correct
> url.
> > var nodes:XMLList = t[i]..page.(@href==url);
> > if(nodes.length() > 0)
> > {
> > //I only want to select the first occurence
> > tree.selectedItem = nodes[0];
> > break;
> > }
> > }
> >
> > This, however, gives me a weird error (probably not that helpfull):
> >
> > TypeError: Error #1010: A term is undefined and has no properties.
> > at
> >
> mx.controls.listClasses::ListBase/setSelectionDataLoop()[E:\dev\beta1\frameworks\projects\framework\src\mx\controls\listClasses\ListBase.as:7360]
> > at
> >
> mx.controls.listClasses::ListBase/commitSelectedItems()[E:\dev\beta1\frameworks\projects\framework\src\mx\controls\listClasses\ListBase.as:7251]
> > at
> >
> mx.controls.listClasses::ListBase/commitSelectedItem()[E:\dev\beta1\frameworks\projects\framework\src\mx\controls\listClasses\ListBase.as:7216