Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much

Adding nodes to scratchpad via personal nodelet

by SirBones (Friar)
on Jun 28, 2004 at 15:12 UTC ( #370215=monkdiscuss: print w/replies, xml ) Need Help??

I hope I'm not missing something embarassingly obvious. I've super searched on "scratchpad personal nodelet" and can't find any other reports of this problem.

When I click on the "Add to pub / priv" links in the Personal Nodelet, the link to the node I'm viewing does not get added to my scratchpad. If I click on "nodelet," however, it appears flawlessly in my nodelet list. I'm (fairly) sure this was working for me a week or so ago, since I have a link in my scratchpad that I know was added via this procedure.

Obviously not a big deal, but I thought I would report the behavior. Please slap me upside the head if this isn't the right place to ask these questions.


"This bounty hunter is my kind of scum: Fearless and inventive." --J.T. Hutt
  • Comment on Adding nodes to scratchpad via personal nodelet

Replies are listed 'Best First'.
Re: Adding nodes to scratchpad via personal nodelet
by ysth (Canon) on Jun 28, 2004 at 18:39 UTC
    This is definitely the place to ask (though the chatterbox is an alternative). I think this was broken quite recently, with this innocuous looking change to scratchpad_link:
    - my $user = getNodeById($user_id); + my $user = $user_id=~/\D/ ? getNode($user_id, 'user') : getNodeById( +$user_id);
    where in one particular case, the passed-in user_id was actually a user node object instead (which getNodeById blithely allows). I find this kind of amusing, that an attempt to make one piece of code more generous in what kinds of input it takes was foiled by another piece of code with a similar generousity :)

    I'd rather see routines expect the kind of data they really want, and rely on the caller to do any transformation needed (in the case of the change above, handlelinks_settings).

    Update: the problem is fixed (or at least worked-around) now.

      Indeed. My Fault.

      The intention here was to resolve the problem that scratchpad_link is used to generate, well, links to scratchpads. The problem was that if you mistyped the name of the person you were linking to, such as [pad://demrphq] you would a link like Scratch Pad Viewer which seemed odd and counterintuitive as it is now you get demrphq's scratchpad which at least looks more reasonable, is less suprising to the author of the link, and is easily corrected in the text box on SPV. However as the code in handlelinks settings had to do the lookup it meant there was no easy way to pass in the incorrect value. And I actually didnt want to add a new parameter because I know you have plans to redo some of that stuff anyway, so an additional parameter would just cause you more issues. Also I thought it made sense. :-)

      my $user; if (ref $user_id) { $user=$user_id; $user_id=$user->{user_id}; } else { $user = $user_id=~/\D/ ? getNode($user_id, 'user') : getNodeById($u +ser_id); }

      Seems to be the best way to deal with this... (IMNSHO anyway)


        First they ignore you, then they laugh at you, then they fight you, then you win.
        -- Gandhi

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: monkdiscuss [id://370215]
Approved by gellyfish
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (4)
As of 2022-05-21 13:45 GMT
Find Nodes?
    Voting Booth?
    Do you prefer to work remotely?

    Results (76 votes). Check out past polls.