Hi John,

Do you have a sample showing your various states?

Graham.

John Grden wrote:

> Yes, xray does that with it's property inspector (datagrid) - based on
> the property type (string, boolean, _currentframe etc) it brings up a
> specific state that has specific tools for editing.
>
> I created a getData method, that receives the event object from the
> clickHandler:
>
> private static function getData(event:Object):Object
> {
>     lastDataGridRow = event.rowIndex;
>     var row:Number = event.rowIndex - 1;
>     var data:Object = app.propertyInspector.dataProvider;
>   
>     var obj:Object = {};
>     obj.prop = data[row].property;
>     obj.value = data[row].value;
>     obj.path = data[row].path;
>     obj.type = data[row].type;
>     obj.objectType = data[row].objectType;
>   
>     return obj;
> }
>
> after having that data, you can use s switch statement to decide on
> the "state" you want to call
>
> app.currentState = "stateName";
>
> hth,
>
> JG
>
> On 6/4/06, *jeremy lu* <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>>
> wrote:
>
>
>     there can be multiple view states inside the itemEditro/Renderer,
>     so why not use a if else clause inside data() then switch to
>     difference states ?
>
>     psudo code:
>
>     override public function data( o ){
>         if(o.editor == "richText"){
>            currentState = "richTextEditor";
>         else{
>            currentState = "defaultButton";
>         }
>     }
>
>
>
>     On 6/5/06, *Graham Weldon* < [EMAIL PROTECTED]
>     <mailto:[EMAIL PROTECTED]>> wrote:
>     Hi all,
>
>     Just wondering if anyone has managed to create a unique or different
>     itemEditor in a Datagrid based on the row its in?
>     More specifically, I would like to choose the itemEditor based on some
>     of the model XML:
>
>         <element name="Hello" id="12" editor="richText"/>
>
>     In this sample, the itemEditor would show a button "edit" that would
>     launch a rich text editor, but the next row might be a simple text
>     input.
>     Any suggestions would be helpful.
>
>     Regards,
>     Graham Weldon
>
>
>
>     ------------------------ Yahoo! Groups Sponsor
>
>
>
>     --
>     Flexcoders Mailing List
>     FAQ:
>     http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
>     <http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt>
>     Search Archives:
>     http://www.mail-archive.com/flexcoders%40yahoogroups.com
>     Yahoo! Groups Links
>
>          http://groups.yahoo.com/group/flexcoders/
>     <http://groups.yahoo.com/group/flexcoders/>
>
>     <mailto:[EMAIL PROTECTED]>
>
>
>
>
>
>
>
>
>     --
>     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=ms&k=Web+site+design+development&w1=Web+site+design+development&w2=Computer+software+development&w3=Software+design+and+development&w4=Macromedia+flex&w5=Software+development+best+practice&c=5&s=166&.sig=L-4QTvxB_quFDtMyhrQaHQ>
>           Computer software development
>     <http://groups.yahoo.com/gads?t=ms&k=Computer+software+development&w1=Web+site+design+development&w2=Computer+software+development&w3=Software+design+and+development&w4=Macromedia+flex&w5=Software+development+best+practice&c=5&s=166&.sig=lvQjSRfQDfWudJSe1lLjHw>
>           Software design and development
>     <http://groups.yahoo.com/gads?t=ms&k=Software+design+and+development&w1=Web+site+design+development&w2=Computer+software+development&w3=Software+design+and+development&w4=Macromedia+flex&w5=Software+development+best+practice&c=5&s=166&.sig=1pMBCdo3DsJbuU9AEmO1oQ>
>
>     Macromedia flex
>     <http://groups.yahoo.com/gads?t=ms&k=Macromedia+flex&w1=Web+site+design+development&w2=Computer+software+development&w3=Software+design+and+development&w4=Macromedia+flex&w5=Software+development+best+practice&c=5&s=166&.sig=OO6nPIrz7_EpZI36cYzBjw>
>           Software development best practice
>     <http://groups.yahoo.com/gads?t=ms&k=Software+development+best+practice&w1=Web+site+design+development&w2=Computer+software+development&w3=Software+design+and+development&w4=Macromedia+flex&w5=Software+development+best+practice&c=5&s=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/> .
>
>
>     ------------------------------------------------------------------------
>
>
>
>
> --
> John Grden - Blitz
>
> --
> 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=ms&k=Web+site+design+development&w1=Web+site+design+development&w2=Computer+software+development&w3=Software+design+and+development&w4=Macromedia+flex&w5=Software+development+best+practice&c=5&s=166&.sig=L-4QTvxB_quFDtMyhrQaHQ>
>       Computer software development
> <http://groups.yahoo.com/gads?t=ms&k=Computer+software+development&w1=Web+site+design+development&w2=Computer+software+development&w3=Software+design+and+development&w4=Macromedia+flex&w5=Software+development+best+practice&c=5&s=166&.sig=lvQjSRfQDfWudJSe1lLjHw>
>       Software design and development
> <http://groups.yahoo.com/gads?t=ms&k=Software+design+and+development&w1=Web+site+design+development&w2=Computer+software+development&w3=Software+design+and+development&w4=Macromedia+flex&w5=Software+development+best+practice&c=5&s=166&.sig=1pMBCdo3DsJbuU9AEmO1oQ>
>
> Macromedia flex
> <http://groups.yahoo.com/gads?t=ms&k=Macromedia+flex&w1=Web+site+design+development&w2=Computer+software+development&w3=Software+design+and+development&w4=Macromedia+flex&w5=Software+development+best+practice&c=5&s=166&.sig=OO6nPIrz7_EpZI36cYzBjw>
>       Software development best practice
> <http://groups.yahoo.com/gads?t=ms&k=Software+development+best+practice&w1=Web+site+design+development&w2=Computer+software+development&w3=Software+design+and+development&w4=Macromedia+flex&w5=Software+development+best+practice&c=5&s=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
Macromedia flex Software development best practice


YAHOO! GROUPS LINKS




Reply via email to