What version of FlexBuilder are you using? The text expanding does not work for me at all and if I use the snip tree buttons to insert something the indentation is fubar.
I had the same problem. You have to customize your Flex Debug/Dev perspective so that the CFEclipse toolbar shows up, and then text expanding will work, which Lee doesn’t mention in his tutorial. There is another step he does mention in the video about associating *.as with the CFML editor (which might actually enable the toolbar for you, I can’t remember). Check out this image.
And, the indention is definitely screwed up if you insert a snippet by clicking. It took me a while to figure out to always test the snippets with the text expanding.
It’s a cryin’ shame though in my opinion that NeXTSTEP Services have never quite gotten their due in OS X. In theory, we already have an app that can do what we want (as you said, TextMate), and all we should have to do is say, from somewhere in Flex Builder, “invoke TextMate and run this bundle item against my selected text” and result comes right back into Flex Builder.
Three problems though:
1. Apple buried the Services menu, that was top-level in NeXT, under the application menu in OS X, so it’s a pain to get to. They also removed the configuration UI for choosing what services you want available and setting key shortcuts.
2. TextMate doesn’t provide any Services as far as I can tell. Perhaps because no one knows they’re there or how to use them, thanks to Apple’s decision above.
3. Java applications like FlexBuilder can’t access Services. Flex Builder > Services is greyed out. Given that Services are implemented with a variation on copy & paste, and you can already copy and paste between Java apps and native apps, this shouldn’t be that hard to support. Apple is already way slow in releasing updated Java Runtimes for OS X; what’s a couple more weeks to make this work?
Yeay for XMLDecoder hacking. I recently created an extended version of SOAPDecoder (which in turn extends XMLDecoder) and overrode decodeType to force dateTime values in SOAP messages to UTC time if they don’t have a time zone designator. (By default Flex interprets these as local time).
I’d really like to see some better examples somewhere on how to use the schema type registry or whatever it’s called to directly generate strongly-typed VO objects. Adobe’s documentation seems a bit scant…
I’ve been using Things since early beta. I think that its interface is simple and looks very good. And if you’re not a strict GTD user it’s perfect choice.
But since I started to follow GTD more I had to switch to OmniFocus. The reason is that Things lack sequential projects. Without them all contexts are useless. And working strict GTD style is simply impossible. You can’t filter only next actions for given context (tag). And 90% of my projects are sequential so until Thing would implement this feature i’ll stick with OF.
And I have to say that OF is a great app. You’ve got to get used to interface and workflow but then working with it very easy and intuitive.
Nice component. I’ve heard some complaints that Flex 4 is much more verbose for doing what was simple in 3. One example is adding an icon to a button. Thoughts on that?
Andy – thanks for the talk at Flex camp. I was the guy who came to talk to you after about my efforts to solve this for a Catalyst created app I was trying out. I had tried to use a click handler with a “firstTime” flag to set the text to “” if firstTime was true and then set the flag false. This cleared the text alright but I lost the cursor and couldn’t enter anything else. I tried using focus with the same result but actually got it to work ok with mouseOver. That would clear the text and then I could click in for focus and enter my text.
I tried doing the same thing in a Flex3 app and the click handler worked fine so it seems like a “feature” of the Spark TextInput. It’s also interesting that if you don’t specify a text property in 4, you get “(text)” as a default which seems a bit weird.
One other thing I noticed is that the FlashBuilder auto complete doesn’t seem to bring up the old Halo components unless they’re ones that aren’t available in Spark yet. At first I thought I wasn’t going to be able to use a Halo TextInput but I just had to type it fully.
I’m hearing from other people that they’ve had success using nightly builds by just restarting Flash Builder. So, maybe start with that and if it still doesn’t work then try a new workspace. Maybe I’m just cursed.
Thanks to Matt Reynolds for sending me a link to the bug I described. I somehow missed it amongst the other 1215 bugs that were returned when I did a quick search for “textinput focus”.
As of today (07/01/09) it appears to still be an open issue, but I can’t reproduce it in build 8344 so it must have been indirectly fixed. I dug around in TextInput, TextBase and UIComponent a little trying to track it down with no luck. I wonder what fixed it. Maybe I’ll diff the two SDKs and see what changed.
UPDATE: Matt just found this bug which sounds spot on, and it’s be closed as of build 7952. Somebody at Adobe’s got their hands full tracking down duplicate bugs that people aren’t researching enough before posting. I was almost one of those people. I need to better at Jira I guess.
Thanks for the great example. May I ask what version of the sdk you used to compile it? It doesn’t seem to work when I compile with the version that comes with Flash Builder Beta.
I’m trying your component (on flex 4.0.0.9237) and get this error message:
‘1119: Access of possibly undefined property textView through a reference with static type AHTextInput. AHTextInput.as TestWeb/src line 29 Flex Problem’
when I use this, it will open a different window for each file in to diff. how do I open it all in 1 p4merge process? I figured this out for merging by googling around, but i’m not sure how to do this for diffing.
I first read GTD in 2004 and implemented a number of things in the “system” however over the course of time through multiple job changed and home moves had let some things slip, so I’m re-reading it with serious intent.
Now comes the point of actually implementing the lists with my preferred hardware (Mac + iPhone), and your article hit on my Google search.
Great rundown and the comments help a lot too.
Like others in the comments above, though, I would love to see an update post about what you’re using now. (And why that one stuck). Or, if you’ve fallen off the track of the whole GTD thing in regards to the software aspect, tell us about that!
Having dipped my toes in OmniFocus, Things, and TaskPaper, it’s readily apparent that it’s the test of time that will vet the winner of this “battle” of applications. Right now I’m leaning toward OF. I personally like the outline-ish format. Being able to simply fly through list creation in almost word-processor like fashion using the return key makes that function blazing fast. Having to hit cmd-N for each new item slows me down. (Probably because my previous attempts at list making have all centered around simple notes apps and the notes function in Apple mail most recently). The main problem with simple notes apps is the process of identifying completed tasks is inelegant/cumbersome. Enough so that lists get longer but old items never seem to go away. Then the lists develop that psychic resistance Allen talks about.
Both look great to me. My biggest issue is that I need a solution that will organize my personal life along with my work life. Unfortunately I am using a PC at work while I am using a MacBook at home. I absolutely need a way to enter my work tasks from my PC and automatically have it sync to my MacBook via the internet. Someone must have a solution to this. I can’t be the only one with this problem.
I have 3 questions regarding this if you don’t mind?
1) After I “Hit return to start merge resolution tool (p4merge)” it pops straight up with this:
2010-01-08 15:50:36.269 p4merge.real[58490:80b] Can’t open input server /Library/InputManagers/Inquisitor
Any idea what this is and whats wrong? the editor still starts and all seems well but things like this bug me :p
2) despite having trustExitCode set to false, it doesn’t ask me if the merge is complete like it would with say vimdiff?
3) i have used both sets of keepBackup settings (both set to false, in fact, everything is as above) but if still leaves pesky .orig files in my working directory… any ideas?
I have a feeling these are linked, could anyone shed some light? Also quite interested to see the authors answer to W. Andrew Loe III’s post?
You’ve mentioned both that you can specify variables to be “filled-in” when inserting a CFEclipse snippet, and using a CFEclipse snippet as a template for an Actionscript Class: would you be so kind as to be more specific with an example, or could you point to some resources explaining the steps – I would be grateful!
Things is an excellent todo list manager. I particularly like the Projects feature. And the fact that it syncs seamlessly with the Mac application, makes this iPhone app a delight to use.
Description Resource Path Location Type
1119: Access of possibly undefined property textView through a reference with static type com.andymcintosh.controls:AdvancedTextInput. AdvancedTextInput.as AdvancedTextInputDemo/src/com/andymcintosh/controls line 66 Flex Problem
[...] McIntosh has written a great overview & tutorial on programmtic skinning in Flex. It was exactly the type of information I was searching for as I attempted to create my first [...]
[...] can’t click on it again until you select something else and then come back to it. I found a blog post of someone else complaining about this, and–even more valuabe–there was a comment from [...]
[...] skins on FlexCoders. If you told me a year ago that I’d be speaking at conferences and writing a book based on the knowledge I’ve gained maintaining this site and developing applications in Flex, [...]
[...] examples of Spark Icon Buttons have shown up in the past few days. Andy mcintosh did an example here, Rob another one here, I did one myself here. While all were using a slightly different approach [...]
[...] noticed a number of people here (Andy McIntosh), and here (Andy Hulstkamp) working with button icon skins. The main reason for this is that Adobe [...]
[...] for merging. I am not a big Perforce fan but the free p4merge tool is really great. Check out the blog post by Andy McIntosh for a detailed explanation how to set it [...]
[...] still searching for a good solution for this in Flash Builder, till now I’ve been using CFEclipse’s SnipTreeView but the problem is it only works with AS3 code and can’t handle MXML. I was so desperate one [...]
[...] Then we have three choices for the PictureButtonSkin: a) create a brand new skin (this had been done before) b) massage the clone of spark.skins.spark.ButtonSkin c) build a descendant (in OOP terms) of the [...]
90 Comments
What version of FlexBuilder are you using? The text expanding does not work for me at all and if I use the snip tree buttons to insert something the indentation is fubar.
I had the same problem. You have to customize your Flex Debug/Dev perspective so that the CFEclipse toolbar shows up, and then text expanding will work, which Lee doesn’t mention in his tutorial. There is another step he does mention in the video about associating *.as with the CFML editor (which might actually enable the toolbar for you, I can’t remember). Check out this image.
And, the indention is definitely screwed up if you insert a snippet by clicking. It took me a while to figure out to always test the snippets with the text expanding.
I’ll have to check this out. Thanks for sharing!
It’s a cryin’ shame though in my opinion that NeXTSTEP Services have never quite gotten their due in OS X. In theory, we already have an app that can do what we want (as you said, TextMate), and all we should have to do is say, from somewhere in Flex Builder, “invoke TextMate and run this bundle item against my selected text” and result comes right back into Flex Builder.
Three problems though:
1. Apple buried the Services menu, that was top-level in NeXT, under the application menu in OS X, so it’s a pain to get to. They also removed the configuration UI for choosing what services you want available and setting key shortcuts.
2. TextMate doesn’t provide any Services as far as I can tell. Perhaps because no one knows they’re there or how to use them, thanks to Apple’s decision above.
3. Java applications like FlexBuilder can’t access Services. Flex Builder > Services is greyed out. Given that Services are implemented with a variation on copy & paste, and you can already copy and paste between Java apps and native apps, this shouldn’t be that hard to support. Apple is already way slow in releasing updated Java Runtimes for OS X; what’s a couple more weeks to make this work?
For further reading:
http://www.macobserver.com/columns/whatsnext/articles/102297.shtml
http://pmougin.wordpress.com/2008/01/28/become-a-mac-os-x-services-ninja/
Yeay for XMLDecoder hacking. I recently created an extended version of SOAPDecoder (which in turn extends XMLDecoder) and overrode decodeType to force dateTime values in SOAP messages to UTC time if they don’t have a time zone designator. (By default Flex interprets these as local time).
I’d really like to see some better examples somewhere on how to use the schema type registry or whatever it’s called to directly generate strongly-typed VO objects. Adobe’s documentation seems a bit scant…
I’ve been using Things since early beta. I think that its interface is simple and looks very good. And if you’re not a strict GTD user it’s perfect choice.
But since I started to follow GTD more I had to switch to OmniFocus. The reason is that Things lack sequential projects. Without them all contexts are useless. And working strict GTD style is simply impossible. You can’t filter only next actions for given context (tag). And 90% of my projects are sequential so until Thing would implement this feature i’ll stick with OF.
And I have to say that OF is a great app. You’ve got to get used to interface and workflow but then working with it very easy and intuitive.
This doesn’t seem to work when there is only a LOCAL and REMOTE, but no BASE… p4merge gets hung up looking for the BASE, which does not exist.
Thanks a lot for the post, but
1)
#!/bin/sh
[ $# -eq 7 ] && /usr/local/bin/p4merge “$2″ “$5″
2)
cmd = p4merge “$BASE” “$LOCAL” “$REMOTE” “$MERGED”
But what does the above line do? Can i use the same thing for GIT on UNIX?
Someone please help
Thanks for the tip, just what I was looking for!
Nice component. I’ve heard some complaints that Flex 4 is much more verbose for doing what was simple in 3. One example is adding an icon to a button. Thoughts on that?
Andrew,
Check out Juan’s post. He’s got a nice looking button with two icons and a glowing label and it’s all less than 75 lines of generously spaced MXML.
http://scalenine.com/blog/2008/07/17/jumping-into-skinning-with-flex-4/
Andy – thanks for the talk at Flex camp. I was the guy who came to talk to you after about my efforts to solve this for a Catalyst created app I was trying out. I had tried to use a click handler with a “firstTime” flag to set the text to “” if firstTime was true and then set the flag false. This cleared the text alright but I lost the cursor and couldn’t enter anything else. I tried using focus with the same result but actually got it to work ok with mouseOver. That would clear the text and then I could click in for focus and enter my text.
I tried doing the same thing in a Flex3 app and the click handler worked fine so it seems like a “feature” of the Spark TextInput. It’s also interesting that if you don’t specify a text property in 4, you get “(text)” as a default which seems a bit weird.
One other thing I noticed is that the FlashBuilder auto complete doesn’t seem to bring up the old Halo components unless they’re ones that aren’t available in Spark yet. At first I thought I wasn’t going to be able to use a Halo TextInput but I just had to type it fully.
Try restarting Builder after you change the SDK …the build error should go away and everything should work fine after that.
Mrinal
Posted that too soon .. read the last line of the post after I posted that comment
Yeah. Restarting FB worked to make the 4.0.0 projects not have the IBE, but I still had to use a new workspace to make the nightly build work.
I’m hearing from other people that they’ve had success using nightly builds by just restarting Flash Builder. So, maybe start with that and if it still doesn’t work then try a new workspace. Maybe I’m just cursed.
Yep – that’s the same TextInput issue I spoke to you about at Flex Camp, glad to see it’s been fixed!
Thanks to Matt Reynolds for sending me a link to the bug I described. I somehow missed it amongst the other 1215 bugs that were returned when I did a quick search for “textinput focus”.
https://bugs.adobe.com/jira/browse/SDK-21967
As of today (07/01/09) it appears to still be an open issue, but I can’t reproduce it in build 8344 so it must have been indirectly fixed. I dug around in TextInput, TextBase and UIComponent a little trying to track it down with no luck. I wonder what fixed it. Maybe I’ll diff the two SDKs and see what changed.
UPDATE: Matt just found this bug which sounds spot on, and it’s be closed as of build 7952. Somebody at Adobe’s got their hands full tracking down duplicate bugs that people aren’t researching enough before posting. I was almost one of those people. I need to better at Jira I guess.
https://bugs.adobe.com/jira/browse/SDK-21833
You can save yourself from having to create the script if you use the launchp4merge that comes bundled:
[mergetool "p4merge"]
cmd = /Applications/p4merge.app/Contents/Resources/launchp4merge “$PWD/$BASE” “$PWD/$REMOTE” “$PWD/$LOCAL” “$PWD/$MERGED”
keepTemporaries = false
trustExitCode = false
keepBackup = false
With this, all you have to do is install the app.
Hey Andy,
Thanks for the great example. May I ask what version of the sdk you used to compile it? It doesn’t seem to work when I compile with the version that comes with Flash Builder Beta.
Thanks,
Justin
Hi There,
I’m trying your component (on flex 4.0.0.9237) and get this error message:
‘1119: Access of possibly undefined property textView through a reference with static type AHTextInput. AHTextInput.as TestWeb/src line 29 Flex Problem’
can you help me with this?
when I use this, it will open a different window for each file in to diff. how do I open it all in 1 p4merge process? I figured this out for merging by googling around, but i’m not sure how to do this for diffing.
I used the version that came with the SDK. I was never able to successfully get any of the nightly builds working.
The Flex team has renamed a bunch of things in the SDK. textView is now called textDisplay or something.
http://opensource.adobe.com/wiki/display/flexsdk/Rename+List
I really enjoyed this comparison. Thank you.
andy, you are right, they change lots of name and make me confused many times. Thank you for sharing the link.
Hey,
This post helped me a lot as I was stuck with the exact problem you have mentioned here.
Thanks a ton!!!
Short and sweet, thanks!
Great work. Thank you.
How would you change this code if you wanted to return an ArrayCollection of CarVO objects instead of just a single one?
This is an excellent article!
I first read GTD in 2004 and implemented a number of things in the “system” however over the course of time through multiple job changed and home moves had let some things slip, so I’m re-reading it with serious intent.
Now comes the point of actually implementing the lists with my preferred hardware (Mac + iPhone), and your article hit on my Google search.
Great rundown and the comments help a lot too.
Like others in the comments above, though, I would love to see an update post about what you’re using now. (And why that one stuck). Or, if you’ve fallen off the track of the whole GTD thing in regards to the software aspect, tell us about that!
Having dipped my toes in OmniFocus, Things, and TaskPaper, it’s readily apparent that it’s the test of time that will vet the winner of this “battle” of applications. Right now I’m leaning toward OF. I personally like the outline-ish format. Being able to simply fly through list creation in almost word-processor like fashion using the return key makes that function blazing fast. Having to hit cmd-N for each new item slows me down. (Probably because my previous attempts at list making have all centered around simple notes apps and the notes function in Apple mail most recently). The main problem with simple notes apps is the process of identifying completed tasks is inelegant/cumbersome. Enough so that lists get longer but old items never seem to go away. Then the lists develop that psychic resistance Allen talks about.
Anyway, please update us on your status!
Both look great to me. My biggest issue is that I need a solution that will organize my personal life along with my work life. Unfortunately I am using a PC at work while I am using a MacBook at home. I absolutely need a way to enter my work tasks from my PC and automatically have it sync to my MacBook via the internet. Someone must have a solution to this. I can’t be the only one with this problem.
Thank you for your sample! It is very useful
I have 3 questions regarding this if you don’t mind?
1) After I “Hit return to start merge resolution tool (p4merge)” it pops straight up with this:
2010-01-08 15:50:36.269 p4merge.real[58490:80b] Can’t open input server /Library/InputManagers/Inquisitor
Any idea what this is and whats wrong? the editor still starts and all seems well but things like this bug me :p
2) despite having trustExitCode set to false, it doesn’t ask me if the merge is complete like it would with say vimdiff?
3) i have used both sets of keepBackup settings (both set to false, in fact, everything is as above) but if still leaves pesky .orig files in my working directory… any ideas?
I have a feeling these are linked, could anyone shed some light? Also quite interested to see the authors answer to W. Andrew Loe III’s post?
You’ve mentioned both that you can specify variables to be “filled-in” when inserting a CFEclipse snippet, and using a CFEclipse snippet as a template for an Actionscript Class: would you be so kind as to be more specific with an example, or could you point to some resources explaining the steps – I would be grateful!
Thanks
sd
Ok, for anyone needing to know:
To insert variable prompts into your snippet, you can simply type:
$${MY VARIABLE NAME}
…in the position in your snippet code where you need this variable to appear – when inserting the snippet, you’ll be prompted for the variables, etc.
Thanks!
Things is an excellent todo list manager. I particularly like the Projects feature. And the fact that it syncs seamlessly with the Mac application, makes this iPhone app a delight to use.
Very useful information you got here, thank you for sharing.
nice post. good example of a common design issue in flex 4. one question: where is spark.primitives.SimpleText??
Description Resource Path Location Type
1119: Access of possibly undefined property textView through a reference with static type com.andymcintosh.controls:AdvancedTextInput. AdvancedTextInput.as AdvancedTextInputDemo/src/com/andymcintosh/controls line 66 Flex Problem
very good and professional approach! Thank you very much~ It solved the problem which has been annoying me for weeks.
This should explain what happened to SimpleText:
http://opensource.adobe.com/wiki/display/flexsdk/Spark+Text+Primitives+Decision
11 Trackbacks
[...] McIntosh has written a great overview & tutorial on programmtic skinning in Flex. It was exactly the type of information I was searching for as I attempted to create my first [...]
[...] can’t click on it again until you select something else and then come back to it. I found a blog post of someone else complaining about this, and–even more valuabe–there was a comment from [...]
[...] skins on FlexCoders. If you told me a year ago that I’d be speaking at conferences and writing a book based on the knowledge I’ve gained maintaining this site and developing applications in Flex, [...]
[...] [ andy.mcintosh ] A blog about a little bit of everything, but mostly Flash & Flex Development Skip to content « Hooray Snippets! [...]
[...] [ andy.mcintosh ] Skip to content « Prompting TextInput with Flex 4 [...]
[...] examples of Spark Icon Buttons have shown up in the past few days. Andy mcintosh did an example here, Rob another one here, I did one myself here. While all were using a slightly different approach [...]
[...] while back I shared an example of using Flex 4 to create a text input that supports displaying a prompt when it is not focused and [...]
[...] noticed a number of people here (Andy McIntosh), and here (Andy Hulstkamp) working with button icon skins. The main reason for this is that Adobe [...]
[...] for merging. I am not a big Perforce fan but the free p4merge tool is really great. Check out the blog post by Andy McIntosh for a detailed explanation how to set it [...]
[...] still searching for a good solution for this in Flash Builder, till now I’ve been using CFEclipse’s SnipTreeView but the problem is it only works with AS3 code and can’t handle MXML. I was so desperate one [...]
[...] Then we have three choices for the PictureButtonSkin: a) create a brand new skin (this had been done before) b) massage the clone of spark.skins.spark.ButtonSkin c) build a descendant (in OOP terms) of the [...]