Re: [Flashcoders] Object repository and instancing a object

2006-01-02 Thread Weyert de Boer
Pascal FODOR wrote: Humm, looks like this is getting away from the question ;-) The problem with: if ( className != ) return false; instance = new className( valueObject ); return instance; Is that className is a string not a reference so new className() won't work. He you tried

Re: [Flashcoders] Object repository and instancing a object

2006-01-02 Thread Weyert de Boer
Hello Alan, You initialize a TileFactory; the TileFactory loads this XML; then if I call TileFactory.getTile(uniqueName), it scans the XML for the matching tile entry and draws the tile properties from that. Build and assist values for the tile, and return it, and you're all set -- without

[Flashcoders] Caret position coords

2006-01-02 Thread Andreas Rønning
Is there a decent way of getting the _x / _y position of a caret in a text box? Somehow compare the x/y of the textfield with the caret index..? Have a hard time getting an exact value from this. - Andreas ___ Flashcoders mailing list

Re: [Flashcoders] Caret position coords

2006-01-02 Thread Weyert de Boer
Easy... get the x,y in characters of the memo function getCharacterPosition( aMemo: TMemo ): TPoint begin Result.X := LongRec( SendMessage( aMemo.Handle, EM_GETSEL, 0, 0 ) ).Hi; Result.Y := SendMessage( aMemo.Handle, EM_LINEFROMCHAR, Result.X, 0 ); Result.X := Result.X -

Re: [Flashcoders] Caret position coords

2006-01-02 Thread Weyert de Boer
Ooh, this is the flashcoders mailing list. This code is useless! sorry. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Re: [Flashcoders] Caret position coords

2006-01-02 Thread Michael Bedar
To answer the original question - there is no direct way to do this, although you can use the text-extent to get the x offset of the caret fairly easily in a single line textfield. On Jan 2, 2006, at 9:47 AM, Andreas Rønning wrote: Is there a decent way of getting the _x / _y position of a

RE: [Flashcoders] Flash Player 8.5 - Illegal Operation caused by ?

2006-01-02 Thread Derek Vadneau
Firefox 1.0.6 also reports many syntax errors: Error: syntax error Source File: http://www.ericd.net/new_css/sections/aspcomments/aspcomments.asp?blogid=113621728008762265count=1 Line: 1 Source Code: !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN Error: syntax error Source File:

Re: [Flashcoders] Flash Player 8.5 - Illegal Operation caused by ?

2006-01-02 Thread eric dolecki
Not quite sure what those errors are yet, but I am more concerned with Flash barfing. edolecki On 1/2/06, Derek Vadneau [EMAIL PROTECTED] wrote: Firefox 1.0.6 also reports many syntax errors: Error: syntax error Source File:

Re: [Flashcoders] Caret position coords

2006-01-02 Thread Kalle Thyselius, inlovewith
i remember doing this a few years ago, using — a loop (filling the textfield) and autoSize=true to determine if there was a line break (you could determine this in other ways) — and if _height old_height in the loop, do — letterCurrentY += LINE_HEIGHT then use getTextExtent() to get _x. i

Re: [Flashcoders] Caret position coords

2006-01-02 Thread Alias
Whoa - dude, is that MFC or something? Alias On 1/2/06, Weyert de Boer [EMAIL PROTECTED] wrote: Easy... get the x,y in characters of the memo function getCharacterPosition( aMemo: TMemo ): TPoint begin Result.X := LongRec( SendMessage( aMemo.Handle, EM_GETSEL, 0, 0 ) ).Hi; Result.Y :=

Re: [Flashcoders] Object repository and instancing a object

2006-01-02 Thread Jim Kremens
You guys know that you can instantiate classes dynamically (sort of) in Flash, right? class ClassFactory { public static function getClass(name:String, args:Object):Object { return new Function(eval(name))(args ? args : []); } } /* USAGE * //can be any referenced class * var myClass =

Re: [Flashcoders] dataProvider questions

2006-01-02 Thread JesterXL
A dataProvider is a getter/setter property. It is typically an Array, but can be an Object. Array's have their prototype changed when you use the v2 component framework. They have methods added to them, and these methods make up the DataProvider API. This API is used to add data to the

Re: [Flashcoders] dataProvider questions

2006-01-02 Thread JesterXL
Sorry G, missed your 2nd question. Unfortunately, an Array is the ONLY thing you can bind to using a ModelLcoator approach (al la Cairngorm/ARP). So, this is technically the de-facto way to do binding in Flash. - Original Message - From: JesterXL [EMAIL PROTECTED] To: Flashcoders

Re: [Flashcoders] dataProvider questions

2006-01-02 Thread Rich Rodecker
thanks for all that info. so, I can't bind to a recordset? that kinda sucks. I guess i'd need to convert the recordset or xml into an array of objects, then set that as the dp for the component, right? Side question..whats up with the Binding classes in the flash help? would they be of any

Re: [Flashcoders] dataProvider questions

2006-01-02 Thread JesterXL
Well, some things can, sure. A RecordSet follows a subset of the DataProvider API. If you look in mx.remoting.RecordSet, you can see he dispatchers modelChanged, and that's really all you need for dataProviders to work with the v2 components. All of the binding stuff comes with the remoting