Holger Guhl | 1 Dec 2008 11:29
Picon
Favicon

Re: XML.StreamWrapper error on UTF-8 "byte-order mark"

Please, have a look at our recent version of GHCsvImportExport(1.11) in 
Cincom Public Repository. We made some extensions to PeekableStream to 
carefully peek for a BOM (byte order mark). Method #nextBOM peeks for a 
byte order mark and leaves the stream pointer behind its ocurrence (if 
any). Method #getEncodingFromBOM translates the result into an encoding 
symbol.
Method Heeg.CsvReader>>onFileNamed: shows a possible application scenario.
We did not yet extract the reusable PeekableStream stuff to another 
package. I' ld like to encourage you to go with this approach or adapt 
it to your needs. Having reusable code for Stream is better than 
inlining the stuff whenever you need. BTW: The PeekableStream extension 
methods have some nice comments that explain some of the bits and bytes 
"magic".

Regards

Holger Guhl
--

-- 
Senior Consultant * Certified Scrum Master * Holger.Guhl <at> heeg.de
Tel: +49 231 9 75 99 21 * Fax: +49 231 9 75 99 20
Georg Heeg eK Dortmund
Handelsregister: Amtsgericht Dortmund  A 12812

Steven Kelly schrieb:
> In 7.6, parsing a UTF-8 XML file starting with a BOM causes an error "<
> expected, but not found". The code for XML.StreamWrapper>>checkEncoding
> only takes account of a UTF-16 BOM (somewhat odd, given it checks first
> that the encoding is UTF-8). Maybe I'm missing something here. For my
> file to read, the following worked. I couldn't resist changing the check
> for the UTF-16 BOM (FEFF / FFFE) to be rather less cryptic than "c1 * c2
(Continue reading)

Mathieu van Echtelt | 1 Dec 2008 11:34

code coverage tool (using SUnittoo)

Hi all,

I'm trying to get the code coverage tool running, but can't figure out
how to get/see coverage results of methods in package x after running
testcase y?

What I did:

First I loaded:

SUnitToo
SUnitToo(ls)
SUnitToo(verage)
SUnitToo(lsverage)

Than I changed the superclass of my Testcase class to SUnit.TestCase
and my TestResource class to SUnit.TestResource, so my testcases run
under SunitToo instead of classical Sunit.

This all works fine, all my tests run green.

After that I've run the testcases of class CoverageTestCase in Package
SunitToo(verage), all are green (4).

I can find the "eraser button" which is mentioned in:
http://www.cincomsmalltalk.com/userblogs/mls/blogView?search=code%20coverage&searchTitle=true&searchText=true.

So far so good.

What am I missing?
(Continue reading)

Lautaro Fernández | 1 Dec 2008 12:28
Picon

Seeing all the overrides' packages for a method

Does anyone know how to pick up all the packages that override a method?
What I'm trying to do is to select a method and then browse all the overrides only, not to browse the method changes.

Thanks in advance,
Lautaro Fernández
--
Luke LAut SkyFernadezWalker

_______________________________________________
vwnc mailing list
vwnc <at> cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Richard Wettel | 1 Dec 2008 12:37
Picon

CodeCity 1.3 is out

Dear VisualWorks community,

I wanted to let you know that a new version of CodeCity (visualization of software using a 3D city metaphore) with a lot of new features is out.
The new release of CodeCity adds support for evolution analysis and for scripting visualizations, and more stylish configurations.
Please have a look and tell me what you think. You can get the release from:

All the best,
Ricky
_______________________________________________
vwnc mailing list
vwnc <at> cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Steven Kelly | 1 Dec 2008 13:04
Favicon

Re: XML.StreamWrapper error on UTF-8 "byte-order mark"

Thanks Holger, I'll take a look. While of course I agree with the idea
of putting the code in the right place, I find it's much easier to get a
change into the base VW if it's a bug fix to a single base method, than
if it's an extension in the public repository. Once it's in the base VW,
it's maintained and supported, and of course it's there immediately for
both new and experienced users: no need to hit the bug, wonder about it,
ask on the mailing list, wait for the creator of the fix in the public
repository to reply, load the latest version, and update all build
scripts to include it (and add a note to self to check that newer
versions of it are still good, and that it is updated when there is a
new VW version) :-). 

I added a smiley, but I have to admit that it's a slightly pained smile.
Eclipse users have to spend an average of 30 minutes a day just keeping
their IDE up to date, and I worry that VW is heading in the same
direction with all the contributed stuff. I really welcome the moves to
integrate the most used parts in the standard development image. For bug
fixes like this, I think it's even clearer that they should be in the
base.

Steve

> -----Original Message-----
> From: Holger Guhl [mailto:holger <at> heeg.de]
> Sent: 01 December 2008 12:30
> To: Steven Kelly
> Cc: VW NC
> Subject: Re: [vwnc] XML.StreamWrapper error on UTF-8 "byte-order mark"
> 
> Please, have a look at our recent version of GHCsvImportExport(1.11)
in
> Cincom Public Repository. We made some extensions to PeekableStream to
> carefully peek for a BOM (byte order mark). Method #nextBOM peeks for
a
> byte order mark and leaves the stream pointer behind its ocurrence (if
> any). Method #getEncodingFromBOM translates the result into an
encoding
> symbol.
> Method Heeg.CsvReader>>onFileNamed: shows a possible application
> scenario.
> We did not yet extract the reusable PeekableStream stuff to another
> package. I' ld like to encourage you to go with this approach or adapt
> it to your needs. Having reusable code for Stream is better than
> inlining the stuff whenever you need. BTW: The PeekableStream
extension
> methods have some nice comments that explain some of the bits and
bytes
> "magic".
> 
> Regards
> 
> Holger Guhl
> --
> Senior Consultant * Certified Scrum Master * Holger.Guhl <at> heeg.de
> Tel: +49 231 9 75 99 21 * Fax: +49 231 9 75 99 20
> Georg Heeg eK Dortmund
> Handelsregister: Amtsgericht Dortmund  A 12812
> 
> 
> Steven Kelly schrieb:
> > In 7.6, parsing a UTF-8 XML file starting with a BOM causes an error
> "<
> > expected, but not found". The code for
> XML.StreamWrapper>>checkEncoding
> > only takes account of a UTF-16 BOM (somewhat odd, given it checks
> first
> > that the encoding is UTF-8). Maybe I'm missing something here. For
my
> > file to read, the following worked. I couldn't resist changing the
> check
> > for the UTF-16 BOM (FEFF / FFFE) to be rather less cryptic than "c1
*
> c2
> > = 16rFD02" - to understand that you need to know that multiplication
> is
> > commutative, that FE * FF = FD02, and that no other pair of bytes
can
> > multiply to the same value.
> >
> > The last ifTrue: block could just be "stream position: pos+3" if we
> can
> > be certain that will put us in the right place and state, even for
> > funkily encoded multi-byte per character streams. That sounds
> > reasonable, given that we've just decided that this really is a
UTF-8
> > stream.
> >
> > Steve
> >
> > checkEncoding
> >
> > 	| encoding |
> > 	encoding := [stream encoding] on: Error do: [:ex | ex
> > returnWith: #null].
> > 	encoding = #'UTF-8'
> > 		ifTrue:
> > 			[| firstPair third pos |
> > 			pos := stream position.
> > 			stream setBinary: true.
> > 			firstPair := stream nextAvailable: 2.
> > 			third := stream peek.
> > 			stream setBinary: false.
> > 			(#([16rFE 16rFF] [16rFF 16rFE]) includes:
> > firstPair)
> > 				ifTrue: [stream encoder:
> > (UTF16StreamEncoder new
> >
> > forByte1: firstPair first byte2: firstPair last)]
> > 				ifFalse: [(firstPair = #[16rEF 16rBB]
> > and: [third = 16rBF])
> > 							ifTrue:	[stream
> > setBinary: true; next; setBinary: false]
> > 							ifFalse:
> > [stream position: pos]]]
> >
> > _______________________________________________
> > vwnc mailing list
> > vwnc <at> cs.uiuc.edu
> > http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Lautaro Fernández | 1 Dec 2008 14:25
Picon

Re: Seeing all the overrides' packages for a method

I didn't notice that if I select a message a new tab appears in the code tool under the name of "Overriden".
That should work fine for me.

Thanks to Emiliano Pérez who gave me that hint.
Lautaro Fernández.

2008/12/1 Lautaro Fernández <evaklo <at> gmail.com>
Does anyone know how to pick up all the packages that override a method?
What I'm trying to do is to select a method and then browse all the overrides only, not to browse the method changes.

Thanks in advance,
Lautaro Fernández
--
Luke LAut SkyFernadezWalker



--
Luke LAut SkyFernadezWalker
_______________________________________________
vwnc mailing list
vwnc <at> cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Emiliano Pérez | 1 Dec 2008 15:30
Picon

Re: Seeing all the overrides' packages for a method

Hi, check the Overriden tool that shows in the browser when an overriden 
method is selected. If you only want to see a specific case, that should 
be enough.
If you want to see the code that does it, the tool class is 
OverrideCodeTool and the class that handles overrides in general is 
Override.
I think that something like this should get you started:

Override overridesForSelector: selector class: class

HIH, Emiliano.

Lautaro Fernández escribió:
> Does anyone know how to pick up all the packages that override a method?
> What I'm trying to do is to select a method and then browse all the 
> overrides only, not to browse the method changes.
>
> Thanks in advance,
> Lautaro Fernández
> -- 
> Luke LAut SkyFernadezWalker
> ------------------------------------------------------------------------
>
> _______________________________________________
> vwnc mailing list
> vwnc <at> cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
>   
Lautaro Fernández | 1 Dec 2008 14:51
Picon

Re: Seeing all the overrides' packages for a method

2008/12/1 Emiliano Pérez <emilianogperez <at> gmail.com>

Hi, check the Overriden tool that shows in the browser when an overriden
method is selected. If you only want to see a specific case, that should
be enough.

It's indeed. Thanks
 
If you want to see the code that does it,

No I don't want to, but thanks any way!
It was quite silly of me not to see the tab in the code tool.  But with that I'm done.
Thanks for your tip.

Lautaro

the tool class is
OverrideCodeTool and the class that handles overrides in general is
Override.
I think that something like this should get you started:

Override overridesForSelector: selector class: class

HIH, Emiliano.

Lautaro Fernández escribió:
> Does anyone know how to pick up all the packages that override a method?
> What I'm trying to do is to select a method and then browse all the
> overrides only, not to browse the method changes.
>
> Thanks in advance,
> Lautaro Fernández
> --
> Luke LAut SkyFernadezWalker
> ------------------------------------------------------------------------
>
> _______________________________________________
> vwnc mailing list
> vwnc <at> cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
>

_______________________________________________
vwnc mailing list
vwnc <at> cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc



--
Luke LAut SkyFernadezWalker
_______________________________________________
vwnc mailing list
vwnc <at> cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Mark Pirogovsky | 1 Dec 2008 17:44

[VWNC] PostgreSQL connection questions

Hello everybody,

I do have couple of questions about PostgreSQL connection in VW.

1. The PostgreSQL allows to set encoding for the Database as ASCII or 
UTF8 among many others.  However the VW connection to the Postgres 
(PostgreSQLConnection )the stringEncodingName is never set so it lazy 
initializes itself to the #default.

Does it mean that the it is up to the client applications  to set 
appropriate encoding ?  and is there any way do see the default encoding 
  from the database itself upon connecting ?

2.  Is there any way to make VW to PostgreSql communication secure ?

The manual for the database states: "PostgreSQL has native support for 
using SSL connections to encrypt client/server communications for 
increased security. "

However it appears that VW communicates with the PostgreSql without any 
data encryption by default.

Does anyone have any experience or information on how to set SSL 
communication between  VW and PosgreSQL?

Any information is greatly appreciated.

Truly,

--Mark Pirogovsky
Michael Lucas-Smith | 1 Dec 2008 19:28
Picon

Re: code coverage tool (using SUnittoo)

Which version of VW are you using?

Mathieu van Echtelt wrote:
> Hi all,
>
> I'm trying to get the code coverage tool running, but can't figure out
> how to get/see coverage results of methods in package x after running
> testcase y?
>
> What I did:
>
> First I loaded:
>
> SUnitToo
> SUnitToo(ls)
> SUnitToo(verage)
> SUnitToo(lsverage)
>
> Than I changed the superclass of my Testcase class to SUnit.TestCase
> and my TestResource class to SUnit.TestResource, so my testcases run
> under SunitToo instead of classical Sunit.
>
> This all works fine, all my tests run green.
>
> After that I've run the testcases of class CoverageTestCase in Package
> SunitToo(verage), all are green (4).
>
> I can find the "eraser button" which is mentioned in:
> http://www.cincomsmalltalk.com/userblogs/mls/blogView?search=code%20coverage&searchTitle=true&searchText=true.
>
> So far so good.
>
> What am I missing?
>
> note:  I remember a picture of the coverage browser having extra icons
> for the SelectorNavigatorPart in the RB Browser. I don't see them now,
> but package SunitToo(lsoverage) includes overrides for class
> SelectorNavigatorPart e.g. displayTextFor: (percentage calculation),
> so I suspect something went wrong here.
>
>
> thanks in advance,
>
> Mathieu van Echtelt
> _______________________________________________
> vwnc mailing list
> vwnc <at> cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
>
>   

Gmane