eXtreme Assignment 2 Journal


Assignment 2 [ Add a New Entry ]

Friday, April 19, 2002


4/19/2002 04:21:00 AM

Yipeeeee!! We have achieved the state of nirvana in terms of using dynwin. :) So... about this whole... uhm... memory thing... we can actually use all the stdlib stuff by loading the Microsoft Visual C Run time DLL (msvcrt) (i.e. msvcrt.memcpy). So we did.

Now the two methods inside testClipsterUIWin32 (putCurrentClipBoard and getCurrentClipBoard) works remarkably well. We can proceed on to using these two functions inside ClipsterUIWin32 at our next pair programming session.

G'night, and have a pleasant tomorrow. :)



Thursday, April 18, 2002


4/18/2002 03:10:00 AM

I think the way to go about doing this is to first call GlobalAlloc to get a handle back, then use GlobalLock to get a raw pointer back. Now we can use CopyMemory (simply because we don't have access to memcpy) to copy our packed bytes into this new memory buffer. Then GlobalUnlock it and use SetClipboardData on the original handle. I guess there's only one way to find out.:)



Wednesday, April 17, 2002


4/17/2002 12:32:00 AM

Alright, tonight was a pretty low-level night. So the key file to note is testClipsterUIWin32.py. What we set out to do was tackle the story that read:

I do not want the application to effect the content of the local clipboard

That entails:

  • User presses CTRL-ALT-C and ClipsterUIWin32 is able to detect that and handle it

  • ClipsterUIWin32 should be able to copy whatever is currently in the local clipboard, back it up, then simulate a CTRL-C so that a system copy operation will take place, grab the new content that had just been copied, store it in ClipBox, then restore the original from the back up so that it looks as if the clipboard has not been touched. There could be some dicy synchronization issue, but we'll ignore it for now


Now, we have a method in testClipsterUIWin32 called grabCurrentClipboard. It is basically iterating through all the available clipboard formats resident in the system clipboard, then making an exact duplicate of it. The test passed. Try it out by copying random stuff into the clipboard yourself and running testClipsterUIWin32.py. It's kind of inefficient sinec it copies byte by byte as oppsed to copying a chunk at once, but we'll settle for this until we figure out how to do a chunk copy using dynwin. You'll also notice the testKeyReception method simulating keystrokes. You should be able to just use that code to mimic the CTRL-C.

There's also code in ClipsterUIWin32 that handles CTRL-ALT-C and CTRL-ALT-V using GetAsyncKeyState, check that out.

We haven't done anything that changes the flow chart, but Andy will be posting the flow chart that should have been posted after last week's pair programming session. Guys, let's religiously update this flowchart. Accepted responsibility, people. =) C'mon, just couple more weeks to go, let's go eXtreme all the way!!! =)




Tuesday, April 16, 2002


4/16/2002 12:08:00 AM

Here are stats

lines of code: 1484 including comments

defects: 0

number of objects:
indefinite number of Clip
2 ClipStorage (via inheritance)
1 ClipBox
1 ClipCache
1 Clipster
1 ClipsterUI
1 ClipsterUIWin32
2 FileSystemStorage
1 ClipRequestHandler
indefinite number of HttpClint
1 HttpServer.py
indefinite number of RssParse
indefinite number of RssTransducer
1 UserOptions



Monday, April 15, 2002


4/15/2002 04:22:00 PM

Here's our story as it stands today. I'll write up the tasks for the first story to be tackled this week.

Number in parentheses are estimates.
  • I want any peer to be able to retrieve a list of things I can paste from a selected remote clipboard peer (2)

  • I want to be able to specify the remote clipboard peer from which to retrieve pastable data. (2)

  • I want the peer on the receiving end to cache recently downloaded data. (1.5)

  • I want the peer on the receiving end to decide what to paste as well as what data to download for pasting (1.5)

  • I want any given clipboard peer to be able to notify other interested peers of new data availability (1)

  • I want the application to keep a log of all the events (1.5)

  • I do not want the application to effect the content of the local clipboard (1)

  • I do not want things pasted to have any effect on the local machine. (1)

  • I want the application to provide feedback on the transfer of data from the remote clipboard peer if it is going to take more than a second (2.25)

  • I want to just CTRL-C on one computer and CTRL-SHIFT-V on another and have it work as if it were a series of CTRL-C and CTRL-V operations on one computer. (3+)