[Pharo-users] Boostrap for seaside : incorrect JQuery version

2019-02-08 Thread Dominique Dartois
Hi all
I installed seaside + Bootstrap from the « Catalog Browser », following the 
tips at http://smalltalkhub.com/#!/~TorstenBergmann/
I run Pharo 7 64bits on MacOS.
The demo doesn’t react to the mouse clicks. In fact Firefox debugger showed an 
incompatibility between Bootstrap and JQuery versions :


The JQuery Pharo library is 3.3.1 :



Is it possible to correct this just by using an older library of JQuery (if I 
can find one)?

Thank you
---
Dominique Dartois


Re: [Pharo-users] Class name with diacritic character and Pharo

2019-01-27 Thread Dominique Dartois
Hi Sven.
Thank you for the time spend for your reply.
I have tried the same code in Pharo 6.1 (21.0) instead of 7.1.0 and I had NO 
problem.
It seems the class implementation for ZnUTF8Encoder is different.
Thanks again.
---
Dominique

> Le 27 janvier 2019 à 17:03, Sven Van Caekenberghe  a écrit :
> 
> 
> Hi Dominique,
> 
> > On 27 Jan 2019, at 11:40, Dominique Dartois  wrote:
> > 
> > Hello all. 
> > If a use french diacritic character in a class name, the code runs but I 
> > can’t fileout the package nor save it with Monticello. 
> > For example, the C cedilla in the class name drive me to an 
> > ‘ZnInvalidUTF8:Illegal byte for utf-8 encoding' when filing out.
> > 
> > Is it a bug or a feature?
> > Thank you
> > 
> > --- 
> > Dominique Dartois 
> 
> Thanks for reporting this. This is most definitely a bug, I can confirm its 
> occurrence.
> 
> I'm CC pharo-dev as this is quite important. This will be a long mail.
> 
> 
> This is one manifestation of a problem that has been present for quite a 
> while.
> 
> I'll start by describing what I did, what went well and where/how this fails, 
> some generic points, and two conceptual solutions (that need further 
> verification).
> 
> Like you, I created a new subclass:
> 
> Object subclass: #ClasseFrançaise
>   instanceVariableNames: ''
>   classVariableNames: ''
>   package: '_UnpackagedPackage'
> 
> With comment:
> 
> I am ClasseFrançaise.
> 
> Try:
> 
>   ClasseFrançaise new élève.
>   ClasseFrançaise new euro.
> 
> And two methods (in the 'test' protocol):
> 
> élève
>   ^ 'élève'
> 
> euro
>   ^ '€'
> 
> I added the euro sign (because that is encoded in UTF-8 with 3 bytes, not 2 
> like ç).
> Like you said, the system can cope with such class and method names and seems 
> to function fine.
> 
> Looking at the .changes file, the correct source code was appended:
> 
> SNAPSHOT2019-01-26T23:36:18.548555+01:00 work.image priorSource: 
> 339848!
> 
> Object subclass: #ClasseFrançaise
> instanceVariableNames: ''
> classVariableNames: ''
> package: '_UnpackagedPackage'!
> !ClasseFrançaise commentStamp: 'SvenVanCaekenberghe 1/27/2019 12:25' prior: 0!
> I am ClasseFrançaise.!
> !ClasseFrançaise methodsFor: 'test' stamp: 'SvenVanCaekenberghe 1/27/2019 
> 12:26'!
> élève
> ^ 'élève'! !
> !ClasseFrançaise commentStamp: 'SvenVanCaekenberghe 1/27/2019 12:27' prior: 
> 33898360!
> I am ClasseFrançaise.
> 
> Try:
> 
> ClasseFrançaise new élève.
> ClasseFrançaise new euro.
> !
> !ClasseFrançaise methodsFor: 'test' stamp: 'SvenVanCaekenberghe 1/27/2019 
> 12:27'!
> euro
>   ^ '€'! !
> 
> 
> Doing a file out (or otherwise saving the source code) fails. The reason is 
> an incorrect manipulation of this source file while looking for what is 
> called the method preamble, in SourcFileArray>>#getPreambleFrom:at: position
> 
> An programmatic way to invoke the same error is by doing
> 
> (ClasseFrançaise>>#élève) timeStamp.
> (ClasseFrançaise>>#élève) author.
> 
> Both fail with the same error.
> 
> 
> The source code of methods is (currently) stored in a .sources or .changes 
> file. CompiledMethods know their source pointer, an offset in one of these 
> files. Right before the place where the source starts is a preamble that 
> contains some meta information (including the author and timestamp). To 
> access that preamble, the source code pointer is moved backwards to the 
> beginning of the preamble (which begins and ends with a !).
> 
> 
> The current approach fails in the presence of non-ASCII characters. More 
> specifically because of a mixup between the concept of byte position and 
> character position when using UTF-8, a variable length encoding (both the 
> .changes and the .sources are UTF-8 encoded).
> 
> For example, consider
> 
> 'à partir de 10 €' size. "16"
> 'à partir de 10 €' utf8Encoded size. "19"
> 
> So although the string contains 16 characters, it is encoded as 19 bytes, à 
> using 2 bytes and € using 3 bytes. In general, moving backwards or forwards 
> in UTF-8 encoded bytes cannot be done without understanding UTF-8 itself.
> 
> ZnUTF8Encoder can do both (moving forward is #nextFromStream: while moving 
> backwards is #backOnStream:). However, ZnUTF8Encoder is also strict: it will 
> signal an error when force

[Pharo-users] Class name with diacritic character and Pharo

2019-01-27 Thread Dominique Dartois


 
 
  
   
Hello all.
If a use french diacritic character in a class name, the code runs but I can’t fileout the package nor save it with Monticello.
For example, the C cedilla in the class name drive me to an ‘ZnInvalidUTF8:Illegal byte for utf-8 encoding' when filing out.
   
   

   
   
Is it a bug or a feature?
   
   
Thank you
   
   

   
  
  
   
--- 

   
   
Dominique Dartois 

   
   
 


Re: [Pharo-users] Secure socket timeouts on Windows

2018-09-05 Thread Dominique Dartois
Isn't it an Internet configuration issue : proxypac at work and no proxy at 
home?

Pharo doesn't work with a proxy.pac

Cheers

> Le 5 septembre 2018 à 15:40, Andrei Stebakov  a écrit :
> 
> This issue has been bugging me for a while now, but I hesitated to post 
> it since I can't explain what's going on.
> Every time I do any operation in Pharo related to secure socket 
> connection I have strange socket timeout even though I can connect to the URL 
> using web browser.
> This time I was trying to install latest pharo 7.0 via pharo installer 
> and I got  ZdcSecureSocketStream waitForDataFor: hang over trying to download 
>  https://files.pharo.org/get-files/70/pharo-win-stable.zip 
> I can paste that link in Chrome and it can download it for me no problem 
> also I can download it using curl.
> 
> This issue only happens to me at work, when I do the same from home I 
> don't see this issue.
> Anyway, I am at a loss here and wonder how can I debug and fix this 
> issue. 
> Wondering if something like that happened for you guys.
> 


---

Dominique


Re: [Pharo-users] Seaside and Ajax/JQuery

2018-02-19 Thread Dominique Dartois
2018-02-19 22:02 GMT+01:00 Cyril Ferlicot D. :

> Le 19/02/2018 à 21:56, Dominique Dartois a écrit :
> > Hello All.
> > I try to use Ajax/JQuery to update a value in a HTML table by clicking
> > on the table heading.
> > The new value (the update) is not written in the tabledata I associated
> > an id with, but before the table.
> >
> > The code :
> >
> > renderContentOn: html
> >
> > html table: [
> >
> > html tableHead: [
> >
> > html tableRow: [
> >
> > html tableHeading: [ html anchor url: 'javascript:void(0)'; onClick:
> >
> > ((html jQuery: #changeMe) load html: 'BBB'); with: 'Update'].
> >
> > ]
> >
> > ].
> >
> > html tableBody: [
> >
> > html span id: #changeMe; with: [html tableData: [html render: 'AAA']].
> >
> > ]
> >
> > ]
> >
> >
> > The debugger in Firefox displays clearly that the "span id: #changeMe"
> > is not written at the correct place in the generated javascript.
> >
> > Images intégrées 1
> >
> > What am I doing wrong?
> > Regards
> > --
> > Dominique
>
> Hi,
>
> This is possibly because in HTML5 a table element can only contains:
> - tr
> - th
> - td
> - caption
> - col
> - colgroup
> - thead
> - tbody
> - tfoot
>
> It should not contains span to be valid. Maybe your browser make this
> change to make the HTML valid.
>
> --
> Cyril Ferlicot
> https://ferlicot.fr
>
>
Thank you so much Cyril.

The right code is :
html tableData id: #changeMe ; with: [html render: 'AAA'].
and not :
html span id: #changeMe; with: [html tableData: [html render: 'AAA']].

Thanks again Regards


-- 
Dominique


[Pharo-users] Seaside and Ajax/JQuery

2018-02-19 Thread Dominique Dartois
Hello All.
I try to use Ajax/JQuery to update a value in a HTML table by clicking on
the table heading.
The new value (the update) is not written in the tabledata I associated an
id with, but before the table.

The code :

renderContentOn: html

html table: [

html tableHead: [

html tableRow: [

html tableHeading: [ html anchor url: 'javascript:void(0)'; onClick:

((html jQuery: #changeMe) load html: 'BBB'); with: 'Update'].

]

].

html tableBody: [

html span id: #changeMe; with: [html tableData: [html render: 'AAA']].

]

]

The debugger in Firefox displays clearly that the "span id: #changeMe" is
not written at the correct place in the generated javascript.

[image: Images intégrées 1]

What am I doing wrong?
Regards
-- 
Dominique


Re: [Pharo-users] Voyage and Instance Mode

2018-01-25 Thread Dominique Dartois
Thanks Esteban.
I was fooled by the doc : "In instance mode, the first argument is always
the repository on which to performed the operation"...
Well, not really, but the object to store.

Regards

2018-01-25 23:07 GMT+01:00 Esteban Lorenzano :

>
>
> > On 25 Jan 2018, at 23:03, Dominique Dartois  wrote:
> >
> > Hello all.
> >
> > I'am learning to use Voyage by trying the examples in the Voyage doc (in
> the Enterprise Pharo book).
> > I read "By default, Voyage works in instance mode".
> > If I run the example in instance mode, I get an error via the debugger.
> >
> > |repo anAssociation|
> > repo := VOMemoryRepository new.
> > anAssociation := #answer -> 42.
> > anAssociation save: repo.
>
> repo save: anAssociation :)
>
> cheers!
> Esteban
>
> >  ==> "Instance of Association did not understand #save:"
> >
> > What am I doing wrong?
> >
> > --
> > Dominique
>
>
>


-- 
Dominique


[Pharo-users] Voyage and Instance Mode

2018-01-25 Thread Dominique Dartois
Hello all.

I'am learning to use Voyage by trying the examples in the Voyage doc (in
the Enterprise Pharo book).
I read "By default, Voyage works in instance mode".
If I run the example in instance mode, I get an error via the debugger.

|repo anAssociation|
repo := VOMemoryRepository new.
anAssociation := #answer -> 42.
anAssociation save: repo.
 ==> "Instance of Association did not understand #save:"

What am I doing wrong?

-- 
Dominique


Re: [Pharo-users] Seaside : including a static stylesheet.

2017-03-07 Thread Dominique Dartois
Hi Sabine.

It does not seem working for me


I have found this directory here 
"/Users/Dom/Documents/Library/WebServer/Documents" and I tried :

updateRoot: anHtmlRoot
super updateRoot: anHtmlRoot.
anHtmlRoot stylesheet url: 
'http://localhost:8080/Library/WebServer/Documents/columnal.css'.

The style sheet is not found.

I keep on trying.


Regards

---

Dominique


De : Pharo-users  de la part de Sabine 
Manaa 
Envoyé : mardi 7 mars 2017 10:08:33
À : Any question about pharo is welcome
Objet : Re: [Pharo-users] Seaside : including a static stylesheet.

Hi Dominique,

for some cases I also use static files on my local machine, the root directory 
of the local machines web server is

/Library/WebServer/Documents

perhaps this is what you are looking for.

regards
Sabine

2017-02-28 18:53 GMT+01:00 Dominique Dartois 
mailto:d...@dartois.org>>:
In the Seaside book, chapter 17.2 I read I can include a stylesheet this way :

updateRoot: anHtmlRoot
super updateRoot: anHtmlRoot.
anHtmlRoot stylesheet url: 'http://seaside.st/styles/main.css'

On my development machine (macOS) I use http://localhost:8080/myApp as the 
server address and I don’t know the root directory of the Seaside integrated 
web server.

Can anyone help me to find this directory?

Thanks.



---

Dominique Dartois



Re: [Pharo-users] Seaside : including a static stylesheet.

2017-03-01 Thread Dominique Dartois
Thank you Sven.

I have tried successfully the FileLibrary but I want to be able to modify the 
stylesheet without using Pharo which will be running on a remote server. Using 
static documents seemed the solution to me.


> On 28 Feb 2017, at 18:53, Dominique Dartois  wrote:
>
> In the Seaside book, chapter 17.2 I read I can include a stylesheet this way :
>
> updateRoot: anHtmlRoot
> super updateRoot: anHtmlRoot.
> anHtmlRoot stylesheet url: 'http://seaside.st/styles/main.css'
>
> On my development machine (macOS) I use http://localhost:8080/myApp as the 
> server address and I don?t know the root directory of the Seaside integrated 
> web server.
>
> Can anyone help me to find this directory?

The easiest way is to use a Seaside FileLibrary subclass to serve your static 
CSS file. This is described in that same chapter 17.

> Thanks.



---

Dominique Dartois


[Pharo-users] Seaside : including a static stylesheet.

2017-02-28 Thread Dominique Dartois
In the Seaside book, chapter 17.2 I read I can include a stylesheet this way :

updateRoot: anHtmlRoot
super updateRoot: anHtmlRoot.
anHtmlRoot stylesheet url: 'http://seaside.st/styles/main.css'

On my development machine (macOS) I use http://localhost:8080/myApp as the 
server address and I don’t know the root directory of the Seaside integrated 
web server.

Can anyone help me to find this directory?

Thanks.



---

Dominique Dartois