Changeset 153 for trunk/lingosource/castlib1/alexUtilities.ls
- Timestamp:
- 02/21/08 07:51:08 (4 years ago)
- File:
-
- 1 edited
-
trunk/lingosource/castlib1/alexUtilities.ls (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/lingosource/castlib1/alexUtilities.ls
r151 r153 2532 2532 2533 2533 2534 on snipTitle me 2535 str = "-----------------------------------\ 2536 -- CREATED: <currentDate>\ 2537 -- ACTION: Description\ 2538 -- INPUT: -\ 2539 -- RETURNS: -\ 2540 -- CALLER: -\ 2541 -- DEBUG: -\ 2542 -- TODO: -\ 2543 -----------------------------------" 2544 pasteFieldContent str, 1 2545 end 2546 2547 -- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 2548 2549 on snipAbstract me 2550 str = "-- <Scriptname>\ 2551 -----------------------------------\ 2552 -- CREATED:\ 2553 -- <currentDate>\ 2554 --\ 2555 -- DESCRIPTION:\ 2556 -- -\ 2557 --\ 2558 -- REQUIRES:\ 2559 -- (Prerequisites)\ 2560 --\ 2561 -- USAGE:\ 2562 -- -\ 2563 --\ 2564 -- PARAMS:\ 2565 -- -\ 2566 --\ 2567 -- RETURNS:\ 2568 -- -\ 2569 --\ 2570 -- WARNINGS:\ 2571 -- -\ 2572 --\ 2573 -- TODO:\ 2574 -- -\ 2575 -----------------------------------" 2576 pasteFieldContent str, 1 2577 end 2578 2579 -- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 2580 2581 on pasteFieldContent whichFieldname, replacePlaceHolder 2582 m = member(whichFieldname) 2583 if ilk(m) <> #member then exit 2584 if [#field, #text].getPos(m.type) > 0 then mPasteItem m.text, replacePlaceHolder 2585 end 2586 2587 -- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 2588 2534 2589 on pasteDate me 2535 2590 … … 2551 2606 -- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 2552 2607 2553 on mPasteItem me, theText 2554 2555 pastefield = new(#field) 2556 pastefield.text = theText 2557 2558 oldclipboard = new(#field) 2559 oldclipboard.pasteClipBoardInto() 2560 2561 pastefield.copyToClipBoard() 2608 on mPasteItem me, theText, replacePlaceHolder 2562 2609 2563 2610 … … 2580 2627 end if 2581 2628 2629 2630 if ilk(theMem) = #member then 2631 if theMem.type = #script then 2632 2633 --------------------------------- we paste the placeholder only here in this script, because there is a placeholder 2634 --------------------------------- for the current scriptname, which we only "know" here in this script 2635 if replacePlaceHolder = 1 then 2636 placeholders = [["<currentDate>", the short date], ["<scriptname>", theMem.name]] 2637 2638 repeat with repl in placeholders 2639 if repl[1] <> repl[2] then 2640 offs = offset(repl[1], theText) 2641 repeat while offs > 0 2642 put repl[2] into char offs to offs + length(repl[1]) - 1 of theText 2643 offs = offset(repl[1], theText) 2644 end repeat 2645 end if 2646 end repeat 2647 2648 end if 2649 --------------------------------- 2650 2651 end if 2652 end if 2653 2654 pastefield = new(#field) 2655 pastefield.text = theText 2656 2657 oldclipboard = new(#field) 2658 oldclipboard.pasteClipBoardInto() 2659 2660 pastefield.copyToClipBoard() 2661 2662 2582 2663 if ilk(theMem) = #member then 2583 2664 if theMem.type = #script then
Note: See TracChangeset
for help on using the changeset viewer.
