[Pharo-users] Spec / GT Inspector integration

2016-09-01 Thread Alistair Grant
If I have a CompositeModel which I want to display as a tab in a GT
Inspector, what should the inspector method look like?  (I haven't been
able to find any examples in the image or on the web)

I assume it should be something like:


gtInspectEditIn: composite


^ composite spec
title: 'Edit';
display: [ :anObject | MyCompositeModelEditor on: anObject ].


But it isn't clear to me what the display block should be returning.

I can successfully open the window using:


MyCompositeModelEditor new
editObject: anObject;
openWithSpec.


Thanks,
Alistair



Re: [Pharo-users] Spec / GT Inspector integration

2016-09-01 Thread Nicolai Hess
Hi Alistair,

2016-09-01 10:38 GMT+02:00 Alistair Grant :

> If I have a CompositeModel which I want to display as a tab in a GT
> Inspector, what should the inspector method look like?  (I haven't been
> able to find any examples in the image or on the web)
>
> I assume it should be something like:
>
>
> gtInspectEditIn: composite
> 
>
> ^ composite spec
> title: 'Edit';
> display: [ :anObject | MyCompositeModelEditor on: anObject ].
>
>
> But it isn't clear to me what the display block should be returning.
>

The model *after* building the widget with #buildWithSpec


>
> I can successfully open the window using:
>
>
> MyCompositeModelEditor new
> editObject: anObject;
> openWithSpec.
>
>
Here is an example how you can create a spec based presentation (an
IconListModel) ).
Add this method to the other gtInspectorMethods for class Morph (instance
side):

gtInspectorSubmorphs2In: composite

composite spec
title: 'Submorphs2';
display: [:each ||lm|
lm:= IconListModel new.
lm items: each submorphs.
lm icons:[:item | item taskThumbnailOfSize: (16@16) ].
lm displayBlock:[:item | item printString -> item class name].
lm buildWithSpec.
lm
]





>
> Thanks,
> Alistair
>
>


Re: [Pharo-users] BitArray and BooleanArray ?

2016-09-01 Thread Ben Coman
I don't know the answer but I assume you a looking for a memory
efficient way of storing booleans.  So perhaps the Bit Field layouts
discussed here [1] may be of interest considering the recent
introduction of Slots to Pharo.  Otherwise I verry vaguely remember
Bitmap used for this somewhere. Sorry I can't be more precise.

[1] 
http://rmod.inria.fr/archives/papers/Verw11a-OOSPLA11-FlexibleObjectLayouts.pdf

cheers -ben

On Thu, Sep 1, 2016 at 1:32 AM, Bernardo Ezequiel Contreras
 wrote:
> Hi,
>   why there isn't a BitArray or BooleanArray in the collection library?
>   is there a sustitute for that?
>
> thanks
>
> --
> Bernardo E.C.
>
> Sent from a cheap desktop computer in South America.



[Pharo-users] Coding XPath as Smalltalk

2016-09-01 Thread PBKResearch
Hello

 

I am using XPath as a way of dissecting web pages, especially from
Wiktionary. Generally I get good results, but I could get useful extra
flexibility by using the binary Smalltalk operators to represent XPath, as
mentioned at the end of the class comment for XPath. However, the
description there is very terse, and I am having difficulty seeing how to
include more complex expressions, especially attribute tests. I have put
some of my XPath expressions through the XPath compiler and looked at the
output, and out of that I have found expressions which work but look very
clumsy. As an example, I have used the fragment:

 

document xPath: '//div[@id=''catlinks'']//li//text()'

 

and found that an equivalent is:

 

document //'div' ?? [:node :x :y|(node attributeAt: 'id') =
'catlinks']//'li'//[:n| n isStringNode]].

(I had to put two dummy arguments in the three-argument block to get it to
work.) 

 

Is there a more extensive explanation of the use of these binary operators?
If not, could some kind person show me the most concise translation of the
sample XPath above, to give me a start in working out more complex cases?

 

Many thanks for any help.

 

Peter Kenny

 



Re: [Pharo-users] BitArray and BooleanArray ?

2016-09-01 Thread Peter Uhnak
On Thu, Sep 01, 2016 at 07:45:45PM +0800, Ben Coman wrote:
> I don't know the answer but I assume you a looking for a memory
> efficient way of storing booleans.  So perhaps the Bit Field layouts
> discussed here [1] may be of interest considering the recent
> introduction of Slots to Pharo.  Otherwise I verry vaguely remember
> Bitmap used for this somewhere. Sorry I can't be more precise.

Form uses Bitmap to represent graphical stuff. Bitmap itself is a subclass of 
ArrayedCollection.

Peter



[Pharo-users] [ANN] RProjectConnector V2.1

2016-09-01 Thread Blondeau Vincent
Hello everyone,

I am glad to announce the release of version 2.1 of the RProjectConnector.
The binding between Pharo and R (https://www.r-project.org/) is now translated 
to UFFI and so to Pharo 6.0.

You can call directly your R methods from Pharo. For example, with the famous 
iris clustering example:

  iris := 'eval' asREval: {RObject findVar: 'iris'}.
  'plot'
asREval:
{(iris at: 'Petal.Length').
(iris at: 'Petal.Width').
(#pch -> 21).
(#xlab -> 'length').
(#ylab -> 'Width').
(#bg  ->((iris at: 'Species') collect: [ :value 
| {'red'. 'green3'. 'blue'} at: value ])).
(#main -> 'Edgar Anderson''s Iris Data')}.
  iris inspect.

To use it, you should install R and copy the R libraries near the Pharo VM (see 
the documentation on SmalltalkHub 
(http://smalltalkhub.com/#!/~VincentBlondeau/RProjectConnector) for how to 
proceed).


Don't forget to relaunch Pharo after the installation to be able to use the 
connector.

Only basic features are implemented yet, but you can participate to its 
extension!

Cheers,
Vincent Blondeau

!!!*
"Ce message et les pi?ces jointes sont confidentiels et r?serv?s ? l'usage 
exclusif de ses destinataires. Il peut ?galement ?tre prot?g? par le secret 
professionnel. Si vous recevez ce message par erreur, merci d'en avertir 
imm?diatement l'exp?diteur et de le d?truire. L'int?grit? du message ne pouvant 
?tre assur?e sur Internet, la responsabilit? de Worldline ne pourra ?tre 
recherch?e quant au contenu de ce message. Bien que les meilleurs efforts 
soient faits pour maintenir cette transmission exempte de tout virus, 
l'exp?diteur ne donne aucune garantie ? cet ?gard et sa responsabilit? ne 
saurait ?tre recherch?e pour tout dommage r?sultant d'un virus transmis.

This e-mail and the documents attached are confidential and intended solely for 
the addressee; it may also be privileged. If you receive this e-mail in error, 
please notify the sender immediately and destroy it. As its integrity cannot be 
secured on the Internet, the Worldline liability cannot be triggered for the 
message content. Although the sender endeavours to maintain a computer 
virus-free network, the sender does not warrant that this transmission is 
virus-free and will not be liable for any damages resulting from any virus 
transmitted.!!!"


Re: [Pharo-users] [ANN] RProjectConnector V2.1

2016-09-01 Thread Alexandre Bergel
I wanted to try, but there is no installation instruction for OS X :-(
Can you produce some on OS X? It would be great

Anyway, this is great Vincent! Keep pushing!

Alexandre


> On Sep 1, 2016, at 12:42 PM, Blondeau Vincent 
>  wrote:
> 
> Hello everyone, 
>  
> I am glad to announce the release of version 2.1 of the RProjectConnector.
> The binding between Pharo and R (https://www.r-project.org/ 
> ) is now translated to UFFI and so to Pharo 6.0.
>  
> You can call directly your R methods from Pharo. For example, with the famous 
> iris clustering example:
>  
>   iris := 'eval' asREval: {RObject findVar: 'iris'}.
>   'plot'
> asREval:
> {(iris at: 'Petal.Length').
> (iris at: 'Petal.Width').
> (#pch -> 21).
> (#xlab -> 'length').
> (#ylab -> 'Width').
> (#bg  ->((iris at: 'Species') collect: [ 
> :value | {'red'. 'green3'. 'blue'} at: value ])).
> (#main -> 'Edgar Anderson''s Iris Data')}.
>   iris inspect.
>  
> To use it, you should install R and copy the R libraries near the Pharo VM 
> (see the documentation on SmalltalkHub 
> (http://smalltalkhub.com/#!/~VincentBlondeau/RProjectConnector 
> ) for how to 
> proceed).
>  
> Don’t forget to relaunch Pharo after the installation to be able to use the 
> connector.
>  
> Only basic features are implemented yet, but you can participate to its 
> extension!
>  
> Cheers,
> Vincent Blondeau
> 
> !!!*
> "Ce message et les pièces jointes sont confidentiels et réservés à l'usage 
> exclusif de ses destinataires. Il peut également être protégé par le secret 
> professionnel. Si vous recevez ce message par erreur, merci d'en avertir 
> immédiatement l'expéditeur et de le détruire. L'intégrité du message ne 
> pouvant être assurée sur Internet, la responsabilité de Worldline ne pourra 
> être recherchée quant au contenu de ce message. Bien que les meilleurs 
> efforts soient faits pour maintenir cette transmission exempte de tout virus, 
> l'expéditeur ne donne aucune garantie à cet égard et sa responsabilité ne 
> saurait être recherchée pour tout dommage résultant d'un virus transmis.
> 
> This e-mail and the documents attached are confidential and intended solely 
> for the addressee; it may also be privileged. If you receive this e-mail in 
> error, please notify the sender immediately and destroy it. As its integrity 
> cannot be secured on the Internet, the Worldline liability cannot be 
> triggered for the message content. Although the sender endeavours to maintain 
> a computer virus-free network, the sender does not warrant that this 
> transmission is virus-free and will not be liable for any damages resulting 
> from any virus transmitted.!!!"



Re: [Pharo-users] Coding XPath as Smalltalk

2016-09-01 Thread Cédrick Béler
Hi Peter,

Never used Path so I cannot help there. I just wander if you connote use Soup 
to « dissect » your webpages ?
http://www.smalltalkhub.com/#!/~PharoExtras/Soup

HTH,

Cédrik

> Le 1 sept. 2016 à 15:26, PBKResearch  a écrit :
> 
> Hello
>  
> I am using XPath as a way of dissecting web pages, especially from 
> Wiktionary. Generally I get good results, but I could get useful extra 
> flexibility by using the binary Smalltalk operators to represent XPath, as 
> mentioned at the end of the class comment for XPath. However, the description 
> there is very terse, and I am having difficulty seeing how to include more 
> complex expressions, especially attribute tests. I have put some of my XPath 
> expressions through the XPath compiler and looked at the output, and out of 
> that I have found expressions which work but look very clumsy. As an example, 
> I have used the fragment:
>  
> document xPath: '//div[@id=''catlinks'']//li//text()'
>  
> and found that an equivalent is:
>  
> document //'div' ?? [:node :x :y|(node attributeAt: 'id') = 
> 'catlinks']//'li'//[:n| n isStringNode]].
> (I had to put two dummy arguments in the three-argument block to get it to 
> work.) 
>  
> Is there a more extensive explanation of the use of these binary operators? 
> If not, could some kind person show me the most concise translation of the 
> sample XPath above, to give me a start in working out more complex cases?
>  
> Many thanks for any help.
>  
> Peter Kenny



Re: [Pharo-users] UFFI const, unsigned, opaque-ish types

2016-09-01 Thread Ben Coman
Thanks Esteban. That worked.

However it may be good to be more permissive about allowing const to
reduce the surprises for FFI users.  Same for unsigned.

Reviewing   FFIExternalStructureFIeldParser>>praseFields:structure:
I see declarations are parsed simply left-to-right, which okay as the
simplest-thing-that-would-work.   However (in case I get inspired...),
would this benefit from more complex parsing like described at [1] and
[2]?  Or is this unlikely to be a concern in prcatice, and/or the rest
of FFI not ready receive such complex declarations from the parser?

[1] http://www.geeksforgeeks.org/complicated-declarations-in-c/
[2] http://unixwiz.net/techtips/reading-cdecl.html

cheers -ben

On Thu, Sep 1, 2016 at 2:01 AM, Esteban Lorenzano  wrote:
> Hi,
>
> (Short because I'm by phone)
>
> Const should be ignored so you can keep it (if not is a bug)
> Unsigned does not exist :)
> You can always put an alias, but the type you are looking for is "uint"
>
> Cheers,
> Esteban
>
>> On 31 Aug 2016, at 18:59, Ben Coman  wrote:
>>
>> For this definition pulled from a library header file...
>>typedef struct {
>>const void *data;
>>unsigned private_flags;
>>} CXString;
>>
>> which is used with a helper function to get a usable string like...
>>  void show_clang_version(void)
>>  {CXString version = clang_getClangVersion();
>>   printf("%s\n", clang_getCString(version));
>>   clang_disposeString(version);
>>  }
>>
>> ==> 'Debian clang version 3.5.0-10 (tags/RELEASE_350/final) (based on
>> LLVM 3.5.0)'
>>
>>
>> So I defined...
>>FFIExternalStructure subclass: #CXString
>>instanceVariableNames: ''
>>classVariableNames: ''
>>package: 'LibCLang'
>>
>> and ignoring the const as advised in the manual [1],  I try...
>>CXString class >> fieldsDesc
>>^ #(
>> void *data;
>> unsigned private_flags;
>> )
>>
>> but...
>>CXString rebuildFieldAccessors.
>>==>Error: Unable to resolve external type: unsigned
>>
>> I also tried  "unsigned int private_flags;"
>> but get the same error. Any ideas what is wrong?
>>
>>
>> Actually I can kind of ignore creating accessors since this is like an
>> opaque type where I'm not expected to access its internals, but I do
>> need CXString as a return value like this...
>>
>>  LibCLang class >> getClangVersion
>> ^ self ffiCall: #( CXString clang_getClangVersion () ) module: LibCLang
>>
>> which needs to be passed to this function to get a workable string
>>
>>  LibCLang class >> getString: aCXString
>> ^ self ffiCall: #( String clang_getCString ( CXString aCXString )
>> ) module: LibCLang
>>
>> However this doesn't work if I use FFIOpaqueObject instead of
>> FFIExternalStructure.
>> I guess the difference is opaque objects are normally pointers to a
>> type, whereas here that pointer is contained in a struct.
>>
>> What I've done at the moment to push ahead with experimenting is avoid
>> needing to generate accessors by adding...
>>
>>   CXString >> printOn: asStream
>>self getString printOn: aStream
>>
>>CXString >> getString
>>^ self ffiCall: #( String clang_getCString ( CXString self ) )
>> module: LibCLang
>>
>> such that...
>>   LibCLang getClangVersion ""
>>   ==> 'Debian clang version 3.5.0-10 (tags/RELEASE_350/final) (based
>> on LLVM 3.5.0)'
>>
>>
>> Is there a better way to approach this?
>>
>> cheers -ben
>>
>> btw, this is in Pharo 5 (Moose 6).
>>
>> [1] 
>> https://ci.inria.fr/pharo-contribution/view/Books/job/PharoBookWorkInProgress/lastSuccessfulBuild/artifact/book-result/UnifiedFFI/UnifiedFFI.pdf
>>
>



Re: [Pharo-users] [Pharo-dev] [ANN] RProjectConnector V2.1

2016-09-01 Thread Blondeau Vincent
Sorry, I haven’t a Mac.

First, you have to install R.
Then, I think you should only have to copy the R libraries (somewhere in the 
disk^^) to the Pharo VM folder.

Tell me if it works ;)

Vincent

De : Pharo-dev [mailto:pharo-dev-boun...@lists.pharo.org] De la part de 
Alexandre Bergel
Envoyé : jeudi 1 septembre 2016 17:49
À : Any question about pharo is welcome
Cc : scismallt...@googlegroups.com; Pharo Development List
Objet : Re: [Pharo-dev] [Pharo-users] [ANN] RProjectConnector V2.1

I wanted to try, but there is no installation instruction for OS X :-(
Can you produce some on OS X? It would be great

Anyway, this is great Vincent! Keep pushing!

Alexandre


On Sep 1, 2016, at 12:42 PM, Blondeau Vincent 
mailto:vincent.blond...@worldline.com>> wrote:

Hello everyone,

I am glad to announce the release of version 2.1 of the RProjectConnector.
The binding between Pharo and R (https://www.r-project.org/) is now translated 
to UFFI and so to Pharo 6.0.

You can call directly your R methods from Pharo. For example, with the famous 
iris clustering example:

  iris := 'eval' asREval: {RObject findVar: 'iris'}.
  'plot'
asREval:
{(iris at: 'Petal.Length').
(iris at: 'Petal.Width').
(#pch -> 21).
(#xlab -> 'length').
(#ylab -> 'Width').
(#bg  ->((iris at: 'Species') collect: [ :value 
| {'red'. 'green3'. 'blue'} at: value ])).
(#main -> 'Edgar Anderson''s Iris Data')}.
  iris inspect.

To use it, you should install R and copy the R libraries near the Pharo VM (see 
the documentation on SmalltalkHub 
(http://smalltalkhub.com/#!/~VincentBlondeau/RProjectConnector) for how to 
proceed).


Don’t forget to relaunch Pharo after the installation to be able to use the 
connector.

Only basic features are implemented yet, but you can participate to its 
extension!

Cheers,
Vincent Blondeau

!!!*
"Ce message et les pièces jointes sont confidentiels et réservés à l'usage 
exclusif de ses destinataires. Il peut également être protégé par le secret 
professionnel. Si vous recevez ce message par erreur, merci d'en avertir 
immédiatement l'expéditeur et de le détruire. L'intégrité du message ne pouvant 
être assurée sur Internet, la responsabilité de Worldline ne pourra être 
recherchée quant au contenu de ce message. Bien que les meilleurs efforts 
soient faits pour maintenir cette transmission exempte de tout virus, 
l'expéditeur ne donne aucune garantie à cet égard et sa responsabilité ne 
saurait être recherchée pour tout dommage résultant d'un virus transmis.

This e-mail and the documents attached are confidential and intended solely for 
the addressee; it may also be privileged. If you receive this e-mail in error, 
please notify the sender immediately and destroy it. As its integrity cannot be 
secured on the Internet, the Worldline liability cannot be triggered for the 
message content. Although the sender endeavours to maintain a computer 
virus-free network, the sender does not warrant that this transmission is 
virus-free and will not be liable for any damages resulting from any virus 
transmitted.!!!"


!!!*
"Ce message et les pièces jointes sont confidentiels et réservés à l'usage 
exclusif de ses destinataires. Il peut également être protégé par le secret 
professionnel. Si vous recevez ce message par erreur, merci d'en avertir 
immédiatement l'expéditeur et de le détruire. L'intégrité du message ne pouvant 
être assurée sur Internet, la responsabilité de Worldline ne pourra être 
recherchée quant au contenu de ce message. Bien que les meilleurs efforts 
soient faits pour maintenir cette transmission exempte de tout virus, 
l'expéditeur ne donne aucune garantie à cet égard et sa responsabilité ne 
saurait être recherchée pour tout dommage résultant d'un virus transmis.

This e-mail and the documents attached are confidential and intended solely for 
the addressee; it may also be privileged. If you receive this e-mail in error, 
please notify the sender immediately and destroy it. As its integrity cannot be 
secured on the Internet, the Worldline liability cannot be triggered for the 
message content. Although the sender endeavours to maintain a computer 
virus-free network, the sender does not warrant that this transmission is 
virus-free and will not be liable for any damages resulting from any virus 
transmitted.!!!"


Re: [Pharo-users] Coding XPath as Smalltalk

2016-09-01 Thread PBKResearch
Hi Cédrik

 

I started out using Soup, but I found out that it does what its name suggests, 
and jumbles up the contents of the pages. I now parse the pages with 
XMLHTMLParser, which preserves the original structure exactly. The point of 
XPath is that it is a convenient way of specifying a route through the 
structure to the desired information. So the XPath I cited says ‘find a DIV 
node, at any depth, which has id=”catlinks”, then find a descendant which is a 
LI node, then find the text of any descendants.’

 

Peter

 

 

Hi Peter,

 

Never used Path so I cannot help there. I just wander if you connote use Soup 
to « dissect » your webpages ?

http://www.smalltalkhub.com/#!/~PharoExtras/Soup

 

HTH,

 

Cédrik

 

Le 1 sept. 2016 à 15:26, PBKResearch mailto:pe...@pbkresearch.co.uk> > a écrit :

 

Hello

 

I am using XPath as a way of dissecting web pages, especially from Wiktionary. 
Generally I get good results, but I could get useful extra flexibility by using 
the binary Smalltalk operators to represent XPath, as mentioned at the end of 
the class comment for XPath. However, the description there is very terse, and 
I am having difficulty seeing how to include more complex expressions, 
especially attribute tests. I have put some of my XPath expressions through the 
XPath compiler and looked at the output, and out of that I have found 
expressions which work but look very clumsy. As an example, I have used the 
fragment:

 

document xPath: '//div[@id=''catlinks'']//li//text()'

 

and found that an equivalent is:

 

document //'div' ?? [:node :x :y|(node attributeAt: 'id') = 
'catlinks']//'li'//[:n| n isStringNode]].

(I had to put two dummy arguments in the three-argument block to get it to 
work.) 

 

Is there a more extensive explanation of the use of these binary operators? If 
not, could some kind person show me the most concise translation of the sample 
XPath above, to give me a start in working out more complex cases?

 

Many thanks for any help.

 

Peter Kenny

 



Re: [Pharo-users] [Pharo-dev] [ANN] RProjectConnector V2.1

2016-09-01 Thread Alexandre Bergel
I do not see any apparent libraries on OSX. I am inspecting the content of the 
R application Package and it only contains images and some executables.

Alexandre

> On Sep 1, 2016, at 1:55 PM, Blondeau Vincent  
> wrote:
> 
> Sorry, I haven’t a Mac.
>  
> First, you have to install R.
> Then, I think you should only have to copy the R libraries (somewhere in the 
> disk^^) to the Pharo VM folder.
>  
> Tell me if it works ;)
>  
> Vincent
>  
> De : Pharo-dev [mailto:pharo-dev-boun...@lists.pharo.org 
> ] De la part de Alexandre Bergel
> Envoyé : jeudi 1 septembre 2016 17:49
> À : Any question about pharo is welcome
> Cc : scismallt...@googlegroups.com ; 
> Pharo Development List
> Objet : Re: [Pharo-dev] [Pharo-users] [ANN] RProjectConnector V2.1
>  
> I wanted to try, but there is no installation instruction for OS X :-(
> Can you produce some on OS X? It would be great
>  
> Anyway, this is great Vincent! Keep pushing!
>  
> Alexandre
>  
>  
> On Sep 1, 2016, at 12:42 PM, Blondeau Vincent  > wrote:
>  
> Hello everyone, 
>  
> I am glad to announce the release of version 2.1 of the RProjectConnector.
> The binding between Pharo and R (https://www.r-project.org/ 
> ) is now translated to UFFI and so to Pharo 6.0.
>  
> You can call directly your R methods from Pharo. For example, with the famous 
> iris clustering example:
>  
>   iris := 'eval' asREval: {RObject findVar: 'iris'}.
>   'plot'
> asREval:
> {(iris at: 'Petal.Length').
> (iris at: 'Petal.Width').
> (#pch -> 21).
> (#xlab -> 'length').
> (#ylab -> 'Width').
> (#bg  ->((iris at: 'Species') collect: [ 
> :value | {'red'. 'green3'. 'blue'} at: value ])).
> (#main -> 'Edgar Anderson''s Iris Data')}.
>   iris inspect.
>  
> To use it, you should install R and copy the R libraries near the Pharo VM 
> (see the documentation on SmalltalkHub 
> (http://smalltalkhub.com/#!/~VincentBlondeau/RProjectConnector 
> ) for how to 
> proceed).
>  
> Don’t forget to relaunch Pharo after the installation to be able to use the 
> connector.
>  
> Only basic features are implemented yet, but you can participate to its 
> extension!
>  
> Cheers,
> Vincent Blondeau
> 
> !!!*
> "Ce message et les pièces jointes sont confidentiels et réservés à l'usage 
> exclusif de ses destinataires. Il peut également être protégé par le secret 
> professionnel. Si vous recevez ce message par erreur, merci d'en avertir 
> immédiatement l'expéditeur et de le détruire. L'intégrité du message ne 
> pouvant être assurée sur Internet, la responsabilité de Worldline ne pourra 
> être recherchée quant au contenu de ce message. Bien que les meilleurs 
> efforts soient faits pour maintenir cette transmission exempte de tout virus, 
> l'expéditeur ne donne aucune garantie à cet égard et sa responsabilité ne 
> saurait être recherchée pour tout dommage résultant d'un virus transmis.
> 
> This e-mail and the documents attached are confidential and intended solely 
> for the addressee; it may also be privileged. If you receive this e-mail in 
> error, please notify the sender immediately and destroy it. As its integrity 
> cannot be secured on the Internet, the Worldline liability cannot be 
> triggered for the message content. Although the sender endeavours to maintain 
> a computer virus-free network, the sender does not warrant that this 
> transmission is virus-free and will not be liable for any damages resulting 
> from any virus transmitted.!!!"
>  
> 
> !!!*
> "Ce message et les pièces jointes sont confidentiels et réservés à l'usage 
> exclusif de ses destinataires. Il peut également être protégé par le secret 
> professionnel. Si vous recevez ce message par erreur, merci d'en avertir 
> immédiatement l'expéditeur et de le détruire. L'intégrité du message ne 
> pouvant être assurée sur Internet, la responsabilité de Worldline ne pourra 
> être recherchée quant au contenu de ce message. Bien que les meilleurs 
> efforts soient faits pour maintenir cette transmission exempte de tout virus, 
> l'expéditeur ne donne aucune garantie à cet égard et sa responsabilité ne 
> saurait être recherchée pour tout dommage résultant d'un virus transmis.
> 
> This e-mail and the documents attached are confidential and intended solely 
> for the addressee; it may also be privileged. If you receive this e-mail in 
> error, please notify the sender immediately and destroy it. As its i

Re: [Pharo-users] UFFI const, unsigned, opaque-ish types

2016-09-01 Thread Esteban Lorenzano
well, I accept contributions :)
I was thinking about enhance the parser too (but for allowing array 
declarations, not for unsigned)… 
 anyway, as soon as tests passes and backward compatibility is there, I would 
like to have a better parser, yes. 

cheers, 
Esteban

> On 01 Sep 2016, at 18:40, Ben Coman  wrote:
> 
> Thanks Esteban. That worked.
> 
> However it may be good to be more permissive about allowing const to
> reduce the surprises for FFI users.  Same for unsigned.
> 
> Reviewing   FFIExternalStructureFIeldParser>>praseFields:structure:
> I see declarations are parsed simply left-to-right, which okay as the
> simplest-thing-that-would-work.   However (in case I get inspired...),
> would this benefit from more complex parsing like described at [1] and
> [2]?  Or is this unlikely to be a concern in prcatice, and/or the rest
> of FFI not ready receive such complex declarations from the parser?
> 
> [1] http://www.geeksforgeeks.org/complicated-declarations-in-c/
> [2] http://unixwiz.net/techtips/reading-cdecl.html
> 
> cheers -ben
> 
> On Thu, Sep 1, 2016 at 2:01 AM, Esteban Lorenzano  wrote:
>> Hi,
>> 
>> (Short because I'm by phone)
>> 
>> Const should be ignored so you can keep it (if not is a bug)
>> Unsigned does not exist :)
>> You can always put an alias, but the type you are looking for is "uint"
>> 
>> Cheers,
>> Esteban
>> 
>>> On 31 Aug 2016, at 18:59, Ben Coman  wrote:
>>> 
>>> For this definition pulled from a library header file...
>>>   typedef struct {
>>>   const void *data;
>>>   unsigned private_flags;
>>>   } CXString;
>>> 
>>> which is used with a helper function to get a usable string like...
>>> void show_clang_version(void)
>>> {CXString version = clang_getClangVersion();
>>>  printf("%s\n", clang_getCString(version));
>>>  clang_disposeString(version);
>>> }
>>> 
>>> ==> 'Debian clang version 3.5.0-10 (tags/RELEASE_350/final) (based on
>>> LLVM 3.5.0)'
>>> 
>>> 
>>> So I defined...
>>>   FFIExternalStructure subclass: #CXString
>>>   instanceVariableNames: ''
>>>   classVariableNames: ''
>>>   package: 'LibCLang'
>>> 
>>> and ignoring the const as advised in the manual [1],  I try...
>>>   CXString class >> fieldsDesc
>>>   ^ #(
>>>void *data;
>>>unsigned private_flags;
>>>)
>>> 
>>> but...
>>>   CXString rebuildFieldAccessors.
>>>   ==>Error: Unable to resolve external type: unsigned
>>> 
>>> I also tried  "unsigned int private_flags;"
>>> but get the same error. Any ideas what is wrong?
>>> 
>>> 
>>> Actually I can kind of ignore creating accessors since this is like an
>>> opaque type where I'm not expected to access its internals, but I do
>>> need CXString as a return value like this...
>>> 
>>> LibCLang class >> getClangVersion
>>>^ self ffiCall: #( CXString clang_getClangVersion () ) module: LibCLang
>>> 
>>> which needs to be passed to this function to get a workable string
>>> 
>>> LibCLang class >> getString: aCXString
>>>^ self ffiCall: #( String clang_getCString ( CXString aCXString )
>>> ) module: LibCLang
>>> 
>>> However this doesn't work if I use FFIOpaqueObject instead of
>>> FFIExternalStructure.
>>> I guess the difference is opaque objects are normally pointers to a
>>> type, whereas here that pointer is contained in a struct.
>>> 
>>> What I've done at the moment to push ahead with experimenting is avoid
>>> needing to generate accessors by adding...
>>> 
>>>  CXString >> printOn: asStream
>>>   self getString printOn: aStream
>>> 
>>>   CXString >> getString
>>>   ^ self ffiCall: #( String clang_getCString ( CXString self ) )
>>> module: LibCLang
>>> 
>>> such that...
>>>  LibCLang getClangVersion ""
>>>  ==> 'Debian clang version 3.5.0-10 (tags/RELEASE_350/final) (based
>>> on LLVM 3.5.0)'
>>> 
>>> 
>>> Is there a better way to approach this?
>>> 
>>> cheers -ben
>>> 
>>> btw, this is in Pharo 5 (Moose 6).
>>> 
>>> [1] 
>>> https://ci.inria.fr/pharo-contribution/view/Books/job/PharoBookWorkInProgress/lastSuccessfulBuild/artifact/book-result/UnifiedFFI/UnifiedFFI.pdf
>>> 
>> 
> 




Re: [Pharo-users] Spec / GT Inspector integration

2016-09-01 Thread Alistair Grant
Hi Nicolai,

On Thu, Sep 01, 2016 at 11:00:29AM +0200, Nicolai Hess wrote:
> 
> ...
> 
> Here is an example how you can create a spec based presentation (an
> IconListModel) ).
> Add this method to the other gtInspectorMethods for class Morph (instance
> side):
> 
> gtInspectorSubmorphs2In: composite
>      
>     composite spec
>         title: 'Submorphs2';
>         display: [:each ||lm|
>             lm:= IconListModel new.
>             lm items: each submorphs.
>             lm icons:[:item | item taskThumbnailOfSize: (16@16) ].
>             lm displayBlock:[:item | item printString -> item class name].
>             lm buildWithSpec.
>             lm
>             ]

Perfect, thank you!

I've made a note to create an example, either as a comment or using GT
Examples, and submit it back for inclusion in the core image.

Thanks again,
Alistair




Re: [Pharo-users] Coding XPath as Smalltalk

2016-09-01 Thread Hernán Morales Durand
Hi Peter,

2016-09-01 10:26 GMT-03:00 PBKResearch :

> Hello
>
>
>
> I am using XPath as a way of dissecting web pages, especially from
> Wiktionary.
>

Any specific reason to not use the SPARQL endpoint?



> Generally I get good results, but I could get useful extra flexibility by
> using the binary Smalltalk operators to represent XPath, as mentioned at
> the end of the class comment for XPath. However, the description there is
> very terse, and I am having difficulty seeing how to include more complex
> expressions, especially attribute tests.
>

Which XPath version are you using? How did you installed it?



> I have put some of my XPath expressions through the XPath compiler and
> looked at the output, and out of that I have found expressions which work
> but look very clumsy. As an example, I have used the fragment:
>
>
>
> document xPath: '//div[@id=''catlinks'']//li//text()'
>
>
>
> and found that an equivalent is:
>
>
>
> document //'div' ?? [:node :x :y|(node attributeAt: 'id') =
> 'catlinks']//'li'//[:n| n isStringNode]].
>
> (I had to put two dummy arguments in the three-argument block to get it to
> work.)
>
>
>
> Is there a more extensive explanation of the use of these binary
> operators? If not, could some kind person show me the most concise
> translation of the sample XPath above, to give me a start in working out
> more complex cases?
>
>
>
> Many thanks for any help.
>
>
>
> Peter Kenny
>
>
>


[Pharo-users] No right-button menu in Inspector on a ByteString

2016-09-01 Thread H. Hirzel
Hello

I have an Inspector on n a ByteString open and would like to copy out
the string into the clipboard.

I can select the text but there is no right-mouse button menu to copy it.

ALT-C just replaces the text with a c
CTRL-C the same.

I am using Pharo 5.0 on Linux Mint.

In the preferences I found nothing how to activate a right mouse
button menu nor something about activating an edit menu.

What am I missing?

Kind regards

Hannes



Re: [Pharo-users] No right-button menu in Inspector on a ByteString

2016-09-01 Thread H. Hirzel
Found the answer:

the right-mouse button menu is only available in the 'raw' tab ...

--H.

On 9/1/16, H. Hirzel  wrote:
> Hello
>
> I have an Inspector on n a ByteString open and would like to copy out
> the string into the clipboard.
>
> I can select the text but there is no right-mouse button menu to copy it.
>
> ALT-C just replaces the text with a c
> CTRL-C the same.
>
> I am using Pharo 5.0 on Linux Mint.
>
> In the preferences I found nothing how to activate a right mouse
> button menu nor something about activating an edit menu.
>
> What am I missing?
>
> Kind regards
>
> Hannes
>



Re: [Pharo-users] No right-button menu in Inspector on a ByteString

2016-09-01 Thread H. Hirzel
However the text is incomplete there. No possibility to get it into
the clip board.

Question still open 


On 9/1/16, H. Hirzel  wrote:
> Found the answer:
>
> the right-mouse button menu is only available in the 'raw' tab ...
>
> --H.
>
> On 9/1/16, H. Hirzel  wrote:
>> Hello
>>
>> I have an Inspector on n a ByteString open and would like to copy out
>> the string into the clipboard.
>>
>> I can select the text but there is no right-mouse button menu to copy it.
>>
>> ALT-C just replaces the text with a c
>> CTRL-C the same.
>>
>> I am using Pharo 5.0 on Linux Mint.
>>
>> In the preferences I found nothing how to activate a right mouse
>> button menu nor something about activating an edit menu.
>>
>> What am I missing?
>>
>> Kind regards
>>
>> Hannes
>>
>



[Pharo-users] How do I display a text in a text window?

2016-09-01 Thread H. Hirzel
Hello

I want to display a string (no code)  in a text window.

What is the equivalent of the Squeak expression

StringHolder
 new textContents: (MyTextCollection at: 101);
 openLabel: 'theText 101'

in Pharo 5.0?

Regards

Hannes



Re: [Pharo-users] Coding XPath as Smalltalk

2016-09-01 Thread PBKResearch
Hi Hernan

 

I don’t understand your first question – I can’t see a connection between 
SPARQL and what I am doing.

 

I downloaded XPath from http://smalltalkhub.com/mc/PharoExtras/XPath/. However, 
I am probably using a somewhat out of date version; I downloaded it about a 
year ago.

 

Peter

 

From: Pharo-users [mailto:pharo-users-boun...@lists.pharo.org] On Behalf Of 
Hernán Morales Durand
Sent: 01 September 2016 18:54
To: Any question about pharo is welcome 
Subject: Re: [Pharo-users] Coding XPath as Smalltalk

 

Hi Peter,

 

2016-09-01 10:26 GMT-03:00 PBKResearch mailto:pe...@pbkresearch.co.uk> >:

Hello

 

I am using XPath as a way of dissecting web pages, especially from Wiktionary. 

 

Any specific reason to not use the SPARQL endpoint?


 

Generally I get good results, but I could get useful extra flexibility by using 
the binary Smalltalk operators to represent XPath, as mentioned at the end of 
the class comment for XPath. However, the description there is very terse, and 
I am having difficulty seeing how to include more complex expressions, 
especially attribute tests. 

 

Which XPath version are you using? How did you installed it?


 

I have put some of my XPath expressions through the XPath compiler and looked 
at the output, and out of that I have found expressions which work but look 
very clumsy. As an example, I have used the fragment:

 

document xPath: '//div[@id=''catlinks'']//li//text()'

 

and found that an equivalent is:

 

document //'div' ?? [:node :x :y|(node attributeAt: 'id') = 
'catlinks']//'li'//[:n| n isStringNode]].

(I had to put two dummy arguments in the three-argument block to get it to 
work.) 

 

Is there a more extensive explanation of the use of these binary operators? If 
not, could some kind person show me the most concise translation of the sample 
XPath above, to give me a start in working out more complex cases?

 

Many thanks for any help.

 

Peter Kenny

 

 



Re: [Pharo-users] Coding XPath as Smalltalk

2016-09-01 Thread Hernán Morales Durand
2016-09-01 16:51 GMT-03:00 PBKResearch :

> Hi Hernan
>
>
>
> I don’t understand your first question – I can’t see a connection between
> SPARQL and what I am doing.
>
>
>

You could get the Wikitionary data by querying a SPARQL endpoint
http://wiktionary.dbpedia.org/sparql instead of scrapping web pages (which
seems more difficult)


> I downloaded XPath from http://smalltalkhub.com/mc/PharoExtras/XPath/.
> However, I am probably using a somewhat out of date version; I downloaded
> it about a year ago.
>
>
>

I don't know about that version. I copied an old version from SqueakSource
(with permission) and updated from time to time, but there is no much.
There is also a XPath2 repository which you may try.

Hernán


> Peter
>
>
>
> *From:* Pharo-users [mailto:pharo-users-boun...@lists.pharo.org] *On
> Behalf Of *Hernán Morales Durand
> *Sent:* 01 September 2016 18:54
> *To:* Any question about pharo is welcome 
> *Subject:* Re: [Pharo-users] Coding XPath as Smalltalk
>
>
>
> Hi Peter,
>
>
>
> 2016-09-01 10:26 GMT-03:00 PBKResearch :
>
> Hello
>
>
>
> I am using XPath as a way of dissecting web pages, especially from
> Wiktionary.
>
>
>
> Any specific reason to not use the SPARQL endpoint?
>
>
>
>
> Generally I get good results, but I could get useful extra flexibility by
> using the binary Smalltalk operators to represent XPath, as mentioned at
> the end of the class comment for XPath. However, the description there is
> very terse, and I am having difficulty seeing how to include more complex
> expressions, especially attribute tests.
>
>
>
> Which XPath version are you using? How did you installed it?
>
>
>
>
> I have put some of my XPath expressions through the XPath compiler and
> looked at the output, and out of that I have found expressions which work
> but look very clumsy. As an example, I have used the fragment:
>
>
>
> document xPath: '//div[@id=''catlinks'']//li//text()'
>
>
>
> and found that an equivalent is:
>
>
>
> document //'div' ?? [:node :x :y|(node attributeAt: 'id') =
> 'catlinks']//'li'//[:n| n isStringNode]].
>
> (I had to put two dummy arguments in the three-argument block to get it to
> work.)
>
>
>
> Is there a more extensive explanation of the use of these binary
> operators? If not, could some kind person show me the most concise
> translation of the sample XPath above, to give me a start in working out
> more complex cases?
>
>
>
> Many thanks for any help.
>
>
>
> Peter Kenny
>
>
>
>
>


Re: [Pharo-users] How do I display a text in a text window?

2016-09-01 Thread H. Hirzel
Answer:

To open a text window with text I do

 Workspace openContents: (MyTextCollection at: 101).


Display as text only:

At the bottom I can switch between

- plain text
- smalltalk scripting

But the text remains red in both cases.

What am I missing?

--Hannes

On 9/1/16, H. Hirzel  wrote:
> Hello
>
> I want to display a string (no code)  in a text window.
>
> What is the equivalent of the Squeak expression
>
> StringHolder
>  new textContents: (MyTextCollection at: 101);
>  openLabel: 'theText 101'
>
> in Pharo 5.0?
>
> Regards
>
> Hannes
>



Re: [Pharo-users] No right-button menu in Inspector on a ByteString

2016-09-01 Thread Ben Coman
I agree.  I've suffered the same need previously.  Unless there is a
particular reason its been designed against, I'd request the usual
shortcut keys work.  I often want to use ctrl-b, ctrl-m in the default
tab, even though switching to the raw tab works.

cheers -ben

On Fri, Sep 2, 2016 at 3:37 AM, H. Hirzel  wrote:
> However the text is incomplete there. No possibility to get it into
> the clip board.
>
> Question still open 
>
>
> On 9/1/16, H. Hirzel  wrote:
>> Found the answer:
>>
>> the right-mouse button menu is only available in the 'raw' tab ...
>>
>> --H.
>>
>> On 9/1/16, H. Hirzel  wrote:
>>> Hello
>>>
>>> I have an Inspector on n a ByteString open and would like to copy out
>>> the string into the clipboard.
>>>
>>> I can select the text but there is no right-mouse button menu to copy it.
>>>
>>> ALT-C just replaces the text with a c
>>> CTRL-C the same.
>>>
>>> I am using Pharo 5.0 on Linux Mint.
>>>
>>> In the preferences I found nothing how to activate a right mouse
>>> button menu nor something about activating an edit menu.
>>>
>>> What am I missing?
>>>
>>> Kind regards
>>>
>>> Hannes
>>>
>>
>



[Pharo-users] Spec Text Emphasis

2016-09-01 Thread Sean P. DeNigris
Is there a way to change the emphasis of Spec text (TextModel/TextInputModel,
or even LabelModel - I would trade edit-ability for styling)?

The following successfully added the attribute to the text, but it didn't
display in Spec:
checkbox whenActivatedDo: [ self textModel text: (self textModel text
addAttribute: TextEmphasis struckOut) ].

Thanks!



-
Cheers,
Sean
--
View this message in context: 
http://forum.world.st/Spec-Text-Emphasis-tp4913688.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.



[Pharo-users] UFFI cleanup of externally allocated memory (was Re: UFFI const, unsigned, opaque-ish types)

2016-09-01 Thread Ben Coman
Referring to the example show_clang_version() below, cleanup is done
with clang_disposeString(). How does UFFI hook into the object
finalisation mechanism to call this when the object is garage
collected.  My searches result mostly in info on weak collections and
its not clear how this translates to FFI.  Some detail on this would
be useful for the FFI manual .

cheers -ben

On Thu, Sep 1, 2016 at 12:59 AM, Ben Coman  wrote:
> For this definition pulled from a library header file...
> typedef struct {
> const void *data;
> unsigned private_flags;
> } CXString;
>
> which is used with a helper function to get a usable string like...
>   void show_clang_version(void)
>   {CXString version = clang_getClangVersion();
>printf("%s\n", clang_getCString(version));
>clang_disposeString(version);
>   }
>
> ==> 'Debian clang version 3.5.0-10 (tags/RELEASE_350/final) (based on
> LLVM 3.5.0)'
>
>
> So I defined...
> FFIExternalStructure subclass: #CXString
> instanceVariableNames: ''
> classVariableNames: ''
> package: 'LibCLang'
>
> and ignoring the const as advised in the manual [1],  I try...
> CXString class >> fieldsDesc
> ^ #(
>  void *data;
>  unsigned private_flags;
>  )
>
> but...
> CXString rebuildFieldAccessors.
> ==>Error: Unable to resolve external type: unsigned
>
> I also tried  "unsigned int private_flags;"
> but get the same error. Any ideas what is wrong?
>
>
> Actually I can kind of ignore creating accessors since this is like an
> opaque type where I'm not expected to access its internals, but I do
> need CXString as a return value like this...
>
>   LibCLang class >> getClangVersion
>  ^ self ffiCall: #( CXString clang_getClangVersion () ) module: LibCLang
>
> which needs to be passed to this function to get a workable string
>
>   LibCLang class >> getString: aCXString
>  ^ self ffiCall: #( String clang_getCString ( CXString aCXString )
> ) module: LibCLang
>
> However this doesn't work if I use FFIOpaqueObject instead of
> FFIExternalStructure.
> I guess the difference is opaque objects are normally pointers to a
> type, whereas here that pointer is contained in a struct.
>
> What I've done at the moment to push ahead with experimenting is avoid
> needing to generate accessors by adding...
>
>CXString >> printOn: asStream
> self getString printOn: aStream
>
> CXString >> getString
> ^ self ffiCall: #( String clang_getCString ( CXString self ) )
> module: LibCLang
>
> such that...
>LibCLang getClangVersion ""
>==> 'Debian clang version 3.5.0-10 (tags/RELEASE_350/final) (based
> on LLVM 3.5.0)'
>
>
> Is there a better way to approach this?
>
> cheers -ben
>
> btw, this is in Pharo 5 (Moose 6).
>
> [1] 
> https://ci.inria.fr/pharo-contribution/view/Books/job/PharoBookWorkInProgress/lastSuccessfulBuild/artifact/book-result/UnifiedFFI/UnifiedFFI.pdf



Re: [Pharo-users] No right-button menu in Inspector on a ByteString

2016-09-01 Thread stepharo

THANKS for the feedback.

Normally we talked about it with andrei and doru at ESUG.

Can you check if this was fixed in Pharo 60 because someone told me that 
it was but I'm not sure.



Stef


Le 2/9/16 à 02:28, Ben Coman a écrit :

I agree.  I've suffered the same need previously.  Unless there is a
particular reason its been designed against, I'd request the usual
shortcut keys work.  I often want to use ctrl-b, ctrl-m in the default
tab, even though switching to the raw tab works.

cheers -ben

On Fri, Sep 2, 2016 at 3:37 AM, H. Hirzel  wrote:

However the text is incomplete there. No possibility to get it into
the clip board.

Question still open 


On 9/1/16, H. Hirzel  wrote:

Found the answer:

the right-mouse button menu is only available in the 'raw' tab ...

--H.

On 9/1/16, H. Hirzel  wrote:

Hello

I have an Inspector on n a ByteString open and would like to copy out
the string into the clipboard.

I can select the text but there is no right-mouse button menu to copy it.

ALT-C just replaces the text with a c
CTRL-C the same.

I am using Pharo 5.0 on Linux Mint.

In the preferences I found nothing how to activate a right mouse
button menu nor something about activating an edit menu.

What am I missing?

Kind regards

Hannes








Re: [Pharo-users] How do I display a text in a text window?

2016-09-01 Thread stepharo

Look into UIManager helpers.

I have to run now.


Le 1/9/16 à 21:47, H. Hirzel a écrit :

Hello

I want to display a string (no code)  in a text window.

What is the equivalent of the Squeak expression

 StringHolder
  new textContents: (MyTextCollection at: 101);
  openLabel: 'theText 101'

in Pharo 5.0?

Regards

Hannes







Re: [Pharo-users] Network System Settings

2016-09-01 Thread bharath
Many thanks to Nicolai



--
View this message in context: 
http://forum.world.st/Network-System-Settings-tp4913359p4913698.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.



Re: [Pharo-users] Network System Settings

2016-09-01 Thread bharath
Many thanks Vincent



--
View this message in context: 
http://forum.world.st/Network-System-Settings-tp4913359p4913699.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.



Re: [Pharo-users] No right-button menu in Inspector on a ByteString

2016-09-01 Thread Ben Coman
ctrl-c, ctrl-v are working in Linux Pharo 60197 and also Moose 6.0,
but ctrl-b, ctrl-n, ctrl-m are not.

cheers -ben

On Fri, Sep 2, 2016 at 2:10 PM, stepharo  wrote:
> THANKS for the feedback.
>
> Normally we talked about it with andrei and doru at ESUG.
>
> Can you check if this was fixed in Pharo 60 because someone told me that it
> was but I'm not sure.
>
>
> Stef
>
>
> Le 2/9/16 à 02:28, Ben Coman a écrit :
>
>> I agree.  I've suffered the same need previously.  Unless there is a
>> particular reason its been designed against, I'd request the usual
>> shortcut keys work.  I often want to use ctrl-b, ctrl-m in the default
>> tab, even though switching to the raw tab works.
>>
>> cheers -ben
>>
>> On Fri, Sep 2, 2016 at 3:37 AM, H. Hirzel  wrote:
>>>
>>> However the text is incomplete there. No possibility to get it into
>>> the clip board.
>>>
>>> Question still open 
>>>
>>>
>>> On 9/1/16, H. Hirzel  wrote:

 Found the answer:

 the right-mouse button menu is only available in the 'raw' tab ...

 --H.

 On 9/1/16, H. Hirzel  wrote:
>
> Hello
>
> I have an Inspector on n a ByteString open and would like to copy out
> the string into the clipboard.
>
> I can select the text but there is no right-mouse button menu to copy
> it.
>
> ALT-C just replaces the text with a c
> CTRL-C the same.
>
> I am using Pharo 5.0 on Linux Mint.
>
> In the preferences I found nothing how to activate a right mouse
> button menu nor something about activating an edit menu.
>
> What am I missing?
>
> Kind regards
>
> Hannes
>
>>
>
>



[Pharo-users] Slides online: "Perfection & Feedback Loops" talk from esug

2016-09-01 Thread Marcus Denker
Hi,

At ESUG last Friday I gave a talk "Perfection & Feedback Loops or: why worse is 
better”, I was asked for the slides.

They are now online:


http://www.slideshare.net/MarcusDenker/perfection-feedback-loops-or-why-worse-is-better-65540840

As the slides do not contain much (just headlines), I created a special 
“Annotated” version with links and some comments
so one can follow better:

http://marcusdenker.de/talks/16ESUG/FeedbackLoopsAnnotated.pdf

PDF and .key file are there, too: http://marcusdenker.de/talks/16ESUG/
(the .key file contains the embedded videos shown).

A video of the presentation should be available soon.


Marcus


Re: [Pharo-users] Spec Text Emphasis

2016-09-01 Thread Peter Uhnak
On Thu, Sep 01, 2016 at 09:18:47PM -0700, Sean P. DeNigris wrote:
> Is there a way to change the emphasis of Spec text (TextModel/TextInputModel,
> or even LabelModel - I would trade edit-ability for styling)?

LabelModel has #emphasis:

LabelModel new
emphasis: #(bold);
label: 'bold';
openWithSpec

TextModel accepts Text:

TextModel new
text: 'bold' asText allBold, (' red' asText makeAllColor: Color red);
openWithSpec

TextInputFieldModel will most likely require #whenBuiltDo: and Morphic hacking.

Peter