Account Options

  1. Sign in
The old Google Groups will be going away soon.
Switch to the new Google Groups.
Google Groups Home
« Groups Home
createTiddlyLink bug caused by createExternalLink
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  6 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
JayFresh - http://jayfresh.wordpress .com  
View profile  
 More options May 20 2008, 10:22 am
From: "JayFresh - http://jayfresh.wordpress.com" <jonny.jonat...@googlemail.com>
Date: Tue, 20 May 2008 07:22:58 -0700 (PDT)
Local: Tues, May 20 2008 10:22 am
Subject: createTiddlyLink bug caused by createExternalLink
In the core createTiddlyLink() function, it should add the provided
"className" parameter to the class of the link, but in the case of a
static link (as signalled by setting the "isStatic" flag) it does not.

This is a consequence of the link being created using
createExternalLink (rather than createTiddlyButton), which does not
accept a className for the link.

My first reaction is to extend createExternalLink so it takes a
consistent parameter set with createTiddlyButton i.e.:

place,url -> parent,text,tooltip,action,className,id,accessKey,attribs

Thoughts?

J.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Eric Shulman  
View profile  
 More options May 20 2008, 3:39 pm
From: Eric Shulman <elsdes...@gmail.com>
Date: Tue, 20 May 2008 12:39:42 -0700 (PDT)
Local: Tues, May 20 2008 3:39 pm
Subject: Re: createTiddlyLink bug caused by createExternalLink

> My first reaction is to extend createExternalLink so it takes a
> consistent parameter set with createTiddlyButton i.e.:

> place,url -> parent,text,tooltip,action,className,id,accessKey,attribs

> Thoughts?

Changing the API of an existing core function is a very bad idea!  It
breaks all existing plugin code that uses that function.  Because
people normally just migrate their existing tiddlers (including
plugins) when upgrading, a core change that invalidates existing
plugins immediately breaks their current document content.

If it is necessary to add arguments, they should always be added to
the *end* of the argument list, and the internal handling should check
for "undefined" values so that existing code that does not pass those
arguments won't break.

-e


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
JayFresh - http://jayfresh.wordpress .com  
View profile  
 More options May 21 2008, 6:51 am
From: "JayFresh - http://jayfresh.wordpress.com" <jonny.jonat...@googlemail.com>
Date: Wed, 21 May 2008 03:51:21 -0700 (PDT)
Local: Wed, May 21 2008 6:51 am
Subject: Re: createTiddlyLink bug caused by createExternalLink
Thanks Eric for catching that. I originally intended to extend the
list of params so it should really have been:

place,url -> parent,url,tooltip,action,className,id,accessKey,attribs

I'm interested to know whether this much larger list is overkill or
not. After all, I've only raised this buggy behaviour because of an
inconsistency with the treatment of className.

J.

On May 20, 8:39 pm, Eric Shulman <elsdes...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "method signatures (was Re: createTiddlyLink bug caused by createExternalLink)" by cdent@peermore.com
cdent@peermore.com  
View profile  
 More options May 21 2008, 7:13 am
From: "cd...@peermore.com" <chris.d...@gmail.com>
Date: Wed, 21 May 2008 04:13:19 -0700 (PDT)
Local: Wed, May 21 2008 7:13 am
Subject: method signatures (was Re: createTiddlyLink bug caused by createExternalLink)

On May 20, 8:39 pm, Eric Shulman <elsdes...@gmail.com> wrote:

> If it is necessary to add arguments, they should always be added to
> the *end* of the argument list, and the internal handling should check
> for "undefined" values so that existing code that does not pass those
> arguments won't break.

I would really really really like to see the core methods adjusted,
either stepwise or en masse such that:

* The old method names and signatures remain in place, unchanged
externally but wrap
* New methods that accept dictionaries of named parameters.

For example something like:

function
doHttp(type,url,data,contentType,username,password,callback,params,headers, allowCache)
{
  // either
 var method=type
  return twDoHttp(method, url, callback, {data: data, type:
contentType, <etc>});
  // or
  return twDoHttp({method: type, url: url, data:, data,
contentType:contentType <etc>})

}

The first version has some ordered parameters for things which are
required for the method to function.

I believe this preserves backwards compatibility for existing plugins
while allowing new plugins to alter, without pain, the signature of
core methods.

Is this crazy?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
JayFresh - http://jayfresh.wordpress .com  
View profile  
 More options May 22 2008, 6:23 am
From: "JayFresh - http://jayfresh.wordpress.com" <jonny.jonat...@googlemail.com>
Date: Thu, 22 May 2008 03:23:33 -0700 (PDT)
Local: Thurs, May 22 2008 6:23 am
Subject: Re: method signatures (was Re: createTiddlyLink bug caused by createExternalLink)

> I believe this preserves backwards compatibility for existing plugins
> while allowing new plugins to alter, without pain, the signature of
> core methods.

> Is this crazy?

I suppose you have to weigh this off against the extra code involved
in the core, plus how often people really want to override a core
function... plus how hard it is to hijack as and when you need to:

var oldFunc = someCoreFunc;
someCoreFunc = function(dodgyParams) {
   /* my override code here... */
   oldFunc.call(this,oldParams);

};

J.

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
jayfresh  
View profile  
 More options Jun 4 2008, 6:12 am
From: jayfresh <jnthnl...@googlemail.com>
Date: Wed, 4 Jun 2008 03:12:49 -0700 (PDT)
Local: Wed, Jun 4 2008 6:12 am
Subject: Re: method signatures (was Re: createTiddlyLink bug caused by createExternalLink)
I've created a ticket on trac and supplied a patch that fixes the
createTiddlyLink bug:
http://trac.tiddlywiki.org/ticket/673

On May 22, 11:23 am, "JayFresh - http://jayfresh.wordpress.com"


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »