Initial add of defaria.com
[clearscm.git] / defaria.com / blogs / Status / archives / week_2007_09_30.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" id="sixapart-standard">
4 <head>
5    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6    <meta name="generator" content="Movable Type 5.2.3" />
7
8    <link rel="stylesheet" href="http://defaria.com/blogs/Status/styles-site.css" type="text/css" />
9    <link rel="alternate" type="application/atom+xml" title="Atom" href="http://defaria.com/blogs/Status/atom.xml" />
10    <link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="http://defaria.com/blogs/Status/index.xml"$>" />
11
12    <title>Status for Andrew DeFaria: September 30, 2007 - October  6, 2007 Archives</title>
13
14    <link rel="start" href="http://defaria.com/blogs/Status/" title="Home" />
15    <link rel="prev" href="http://defaria.com/blogs/Status/archives/week_2007_09_23.html" title="September 23, 2007 - September 29, 2007" />
16    <link rel="next" href="http://defaria.com/blogs/Status/archives/week_2007_10_07.html" title="October  7, 2007 - October 13, 2007" />
17 </head>
18 <body class="layout-one-column">
19    <div id="container">
20       <div id="container-inner" class="pkg">
21
22          <div id="banner">
23             <div id="banner-inner" class="pkg">
24                <h1 id="banner-header"><a href="http://defaria.com/blogs/Status/" accesskey="1">Status for Andrew DeFaria</a></h1>
25                <h2 id="banner-description">Searchable status reports and work log</h2>
26             </div>
27          </div>
28
29          <div id="pagebody">
30             <div id="pagebody-inner" class="pkg">
31                <div id="alpha">
32                   <div id="alpha-inner" class="pkg">
33                      
34                      <p class="content-nav">
35                         <a href="http://defaria.com/blogs/Status/archives/week_2007_09_23.html">&laquo; September 23, 2007 - September 29, 2007</a> |
36                         <a href="http://defaria.com/blogs/Status/">Main</a>
37                         | <a href="http://defaria.com/blogs/Status/archives/week_2007_10_07.html">October  7, 2007 - October 13, 2007 &raquo;</a>
38                      </p>
39                      
40                      
41                      <!--
42 <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
43          xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/"
44          xmlns:dc="http://purl.org/dc/elements/1.1/">
45 <rdf:Description
46     rdf:about="http://defaria.com/blogs/Status/archives/week_2007_09_30.html#entry-000685"
47     trackback:ping="http://defaria.com/mt/mt-tb.cgi/72"
48     dc:title="CreateWOR: Subclassing TextUndo"
49     dc:identifier="http://defaria.com/blogs/Status/archives/week_2007_09_30.html#entry-000685"
50     dc:subject="General Dynamics"
51     dc:description=" Added onChange like callbacks to CreateWOR&apos;s text field and text widget. This required subclassing the TextUndo class and properly handling the call back...."
52     dc:creator=""
53     dc:date="2007-10-03T11:17:48-06:00" />
54 </rdf:RDF>
55 -->
56
57
58                      <h2 class="date-header">October  3, 2007</h2>
59                      <a id="a000685"></a>
60                      <div class="entry" id="entry-685">
61                         <h3 class="entry-header">CreateWOR: Subclassing TextUndo</h3>
62                         <div class="entry-content">
63                            <div class="entry-body">
64                               <ul>
65   <li>Added onChange like callbacks to CreateWOR's text field and text widget. This required subclassing the TextUndo class and properly handling the call back.</li>
66 </ul>
67                               
68                               <h3>Subclassing TextUndo</h3>
69
70 <p>This is not working exactly as it should. I can't seem to store things like the onChange callback and a scalar representing the contents of the TextUndo widget in the new MyText object. I rely on overriding the methods InsertKeypress, insert, delete and replace in order to trap when modifications are made to the text, changing the $text member and to call the appropriate callback, but the object that's passed in is different than the object as it was in new and member variables for $text and $modified_CB are missing! So instead I use a package global but this means that only one, the same one, $modification_CB is used for all instantiations of MyText and the $text variable doesn't work at all. Instead one must call get_text in the &$modified_CB:</p>
71
72 <div class=code><pre>
73 # Subclass TextUndo widget to trap and call subroutine when text changes
74 package Tk::MyText;
75   use Tk::TextUndo;
76
77   use base qw/Tk::TextUndo/;
78
79   Construct Tk::Widget "MyText";
80
81   my $modified_CB;
82
83   sub new {
84     my $class   = shift;
85     my $self    = shift;
86     my %parms   = @_;
87
88     $modified_CB        = delete $parms{-modified}      if $parms{-modified};
89     $self->{text}       = delete $parms{-text}          if $parms{-text};
90
91     $class->SUPER::new ($self, %parms);
92   } # new
93
94   sub get_text {
95     my $self = shift;
96
97     return $self->{text};
98   } # get_text
99
100   sub InsertKeypress {
101     my $self = shift;
102
103     $self->SUPER::InsertKeypress (@_);
104     $self->{text} = $self->get ("1.0", "end");
105     &$modified_CB ($self) if $modified_CB;
106   } # InsertKeypress
107
108   sub insert {
109     my $self = shift;
110
111     $self->SUPER::insert (@_);
112     $self->{text} = $self->get ("1.0", "end");
113   } # insert
114
115   sub delete {
116     my $self = shift;
117
118     $self->SUPER::delete (@_);
119     $self->{text} = $self->get ("1.0", "end");
120     &$modified_CB ($self) if $modified_CB;
121   } # delete
122
123   sub replace {
124     my $self = shift;
125
126     $self->SUPER::replace (@_);
127     $self->{text} = $self->get ("1.0", "end");
128     &$modified_CB ($self) if $modified_CB;
129   } # replace
130
131 </pre></div> 
132                               
133                               <p class="entry-footer">
134                                  <span class="post-footers">Posted by  at 11:17 AM</span> <span class="separator">|</span> <a class="permalink" href="http://defaria.com/blogs/Status/archives/000685.html">Permalink</a>
135                                  
136                                  | <a href="http://defaria.com/blogs/Status/archives/000685.html#trackback">TrackBacks (0)</a>
137                               </p>
138                            </div>
139                         </div>
140                      </div>
141                      
142                      <!--
143 <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
144          xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/"
145          xmlns:dc="http://purl.org/dc/elements/1.1/">
146 <rdf:Description
147     rdf:about="http://defaria.com/blogs/Status/archives/week_2007_09_30.html#entry-000684"
148     trackback:ping="http://defaria.com/mt/mt-tb.cgi/71"
149     dc:title="CreateWOR"
150     dc:identifier="http://defaria.com/blogs/Status/archives/week_2007_09_30.html#entry-000684"
151     dc:subject="General Dynamics"
152     dc:description=" Created CreateWOR Perl/Tk application. This will be used by UCMWB Checked in and symlinked the switch config area in /prj/muosran. Investigating other symlinks such that our /prj/muosran area is using what&apos;s checked into Clearcase...."
153     dc:creator=""
154     dc:date="2007-10-02T11:15:22-06:00" />
155 </rdf:RDF>
156 -->
157
158
159                      <h2 class="date-header">October  2, 2007</h2>
160                      <a id="a000684"></a>
161                      <div class="entry" id="entry-684">
162                         <h3 class="entry-header">CreateWOR</h3>
163                         <div class="entry-content">
164                            <div class="entry-body">
165                               <ul>
166   <li>Created CreateWOR Perl/Tk application. This will be used by UCMWB</li>
167
168   <li>Checked in and symlinked the switch config area in /prj/muosran.</li>
169
170   <li>Investigating other symlinks such that our /prj/muosran area is using what's checked into Clearcase.</li>
171                               
172                               <p class="entry-footer">
173                                  <span class="post-footers">Posted by  at 11:15 AM</span> <span class="separator">|</span> <a class="permalink" href="http://defaria.com/blogs/Status/archives/000684.html">Permalink</a>
174                                  
175                                  | <a href="http://defaria.com/blogs/Status/archives/000684.html#trackback">TrackBacks (0)</a>
176                               </p>
177                            </div>
178                         </div>
179                      </div>
180                      
181                   </div>
182                </div>
183             </div>
184          </div>
185       </div>
186    </div>
187 </body>
188 </html>