On 2008-09-28, at 12:31EDT, Henry Minsky wrote:
I think the API where you get an event back to the Text view with an arbitrary string of your choosing is a good level of abstraction. We could make it hairier so that the developer's API is to pass in a closure which will get called back, but that seems like overkill.On Sun, Sep 28, 2008 at 12:11 PM, P T Withington <[EMAIL PROTECTED]> wrote:Well, David says it's not 'hyper' (it doesn't take you to anotherdocument), I say it's not 'link' (it's not a link to anything). It creates an area of text that will send an event when clicked. I appreciate this is nifty new functionality, I'm just asking that we step back a minute and think about the best UI and how to name and document it, so we don't regretit down the road.The message that started this thread was trying to say (something like):<a href="javascript:...">...</a> The other way of saying this in html would be something like: <span onclick="...">...</span>Both of those take out the intermediate step that the current interface has, where you have to assign an ID to the active text and then you have to dispatch from the text click event based on ID to the action you want. I wonder if we want this ID mechanism exposed, or if we want a higher- levelinterface? On 2008-09-27, at 22:04EDT, Henry Minsky wrote:For lack of a better name, I went with the name that Flex assigned to theevent, their event is called TextEvent.LINK, so I called ours "ontextlink". On Sat, Sep 27, 2008 at 9:41 PM, David Temkin <[EMAIL PROTECTED]wrote:It's confusing, I think, to call these hyperlinks since they are customactions. There are better ways to do conventional hyperlinks. "MakeClickableText"? or something. On Sep 27, 2008, at 12:02 PM, P T Withington wrote:I wonder if you should call it makeHyperlink and onhyperlink instead?On 2008-09-27, at 13:35EDT, Henry Minsky wrote:The use case I'm trying to support is making hyperlinks in your textfieldsthat perform custom actions local to the current application.Such as clicking on something in the debugger window and having it performDebug.inspect() of the object. On Sat, Sep 27, 2008 at 1:29 PM, David Temkin < [EMAIL PROTECTED]wrote:Wait a sec.... Isn't the <a> tag, with the normal usage of the hrefattribute, supported within text fields -- even in Flash?Now, href doesn't work within the <view> tag, and <a> doesn't workanywhere but inside of <text>, but that's another story. Not that what you've done isn't useful -- but I don't think it's needed in the normal case (click to link to another page). On Sep 27, 2008, at 6:26 AM, Henry Minsky wrote: Hello, The function to respond to a hyperlink is currently platform-dependent, although just a few days agoI added a cross-platform mechanism to the LFC. That is available onlyif you run a nightly build at the moment.If you look at the implementation, the actual mechanism for Flash 8 applications is to use the syntax <a href="asfunction:funcname,arg">, whereas for DHTML is it to use "javascript:somescript" for target.The new API is to call LzText.makeTextLink, which returns a string oftheform "<a href=...>displayed value</a>" which you can append to thecontentof your LzText field. When clicked, it sends a "ontextlink" event backto the LzText object, with the value you choose. /*** Return a string which can be used to insert a hyperlink in a textfield. * @param String str: The text displayed in the hyperlink.* @param String value: The value returned when the link is clicked.* @access publicThe text returned by makeTextLink can be appended to the text of atext field. It will make an HTML-style anchor, and will have adisplayed representation of the string STR. When clicked, the linkwillsend an ontextlink event to the text view, with a value of VALUE.*/ public function makeTextLink(str, value) { return this.sprite.makeTextLink(str,value); } On Fri, Sep 26, 2008 at 11:29 PM, cyril alias lyric < [EMAIL PROTECTED] wrote:Hello,how to define an hyperlink that throws an onclick-event? I'd like to have the same behaviour as for buttons: <button onclick="doSomething();" /> If possible, what is the correct syntax. I tried <a href="" onclick="doSomething();">Link</a> without success. Cheers, lyric __________________________________________________ Do You Yahoo!?Sie sind Spam leid? Yahoo! Mail verfügt über einen herausragendenSchutz gegen Massenmails. http://mail.yahoo.com-- Henry Minsky Software Architect [EMAIL PROTECTED]-- Henry Minsky Software Architect [EMAIL PROTECTED]-- Henry Minsky Software Architect [EMAIL PROTECTED]-- Henry Minsky Software Architect [EMAIL PROTECTED]
