[Pharo-users] get the names of the currently loaded mcz files

2014-07-10 Thread Sabine Knöfel
Hi,

how can I get the names of the currently in my image loaded mcz files of a
certain package?

Example:
The name of one of my packages is RKA24-View. The currently loaded package
version is RKA24-View-SabineKnoefel.390.mcz
== I want to call a method with parameter RKA24-View and get
RKA24-View-SabineKnoefel.390.mcz as result.

Regards

Sabine



--
View this message in context: 
http://forum.world.st/get-the-names-of-the-currently-loaded-mcz-files-tp4767402.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.



Re: [Pharo-users] get the names of the currently loaded mcz files

2014-07-10 Thread Sabine Knöfel
Hi Sven,
great, this helps! Thank you
Sabine


2014-07-10 15:33 GMT+02:00 Sven Van Caekenberghe-2 [via Smalltalk] 
ml-node+s1294792n4767405...@n4.nabble.com:

 Here is something I sometimes use:

 (MCWorkingCopy allManagers asSortedCollection: [ :a :b | a packageName =
 b packageName ]) collect: #description.

 Have a look at WAVersionUploader or WASeasideVersionStatus.

 But I guess that there are possibilities with Ring as well.

 On 10 Jul 2014, at 15:18, Sabine Knöfel [hidden email]
 http://user/SendEmail.jtp?type=nodenode=4767405i=0 wrote:

  Hi,
 
  how can I get the names of the currently in my image loaded mcz files of
 a
  certain package?
 
  Example:
  The name of one of my packages is RKA24-View. The currently loaded
 package
  version is RKA24-View-SabineKnoefel.390.mcz
  == I want to call a method with parameter RKA24-View and get
  RKA24-View-SabineKnoefel.390.mcz as result.
 
  Regards
 
  Sabine
 
 
 
  --
  View this message in context:
 http://forum.world.st/get-the-names-of-the-currently-loaded-mcz-files-tp4767402.html
  Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
 




 --
  If you reply to this email, your message will be added to the discussion
 below:

 http://forum.world.st/get-the-names-of-the-currently-loaded-mcz-files-tp4767402p4767405.html
  To start a new topic under Pharo Smalltalk Users, email
 ml-node+s1294792n1310670...@n4.nabble.com
 To unsubscribe from Pharo Smalltalk Users, click here
 http://forum.world.st/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=1310670code=c2FiaW5lLmtub2VmZWxAZ21haWwuY29tfDEzMTA2NzB8MTA0OTM5MTYx
 .
 NAML
 http://forum.world.st/template/NamlServlet.jtp?macro=macro_viewerid=instant_html%21nabble%3Aemail.namlbase=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespacebreadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml





--
View this message in context: 
http://forum.world.st/get-the-names-of-the-currently-loaded-mcz-files-tp4767402p4767407.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.

Re: [Pharo-users] ZnLineTooLong override alternative?

2014-07-03 Thread Sabine Knöfel
Hi Sven,

the tag I want to read is in the header section.

The jQuery code simply gets the text within the style tag (which is in
the header) and passes it into the event data.

I assume you have no alternative, e.g. changing the limit only for this
request?

Regards
Sabine


On Thu, Jul 3, 2014 at 11:34 AM, Sven Van Caekenberghe-2 [via Smalltalk] 
ml-node+s1294792n4766309...@n4.nabble.com wrote:

 Hi,

 The jQuery code is above my level of understanding I am afraid. I wonder
 where/how exactly you hit the line length limit. Because it is only
 applicable when reading the HTTP header, normally not the body.

 Sven

 On 02 Jul 2014, at 15:42, Sabine Knöfel [hidden email]
 http://user/SendEmail.jtp?type=nodenode=4766309i=0 wrote:

  Hi Sven, all,
 
  I ran into the same problem as described here:
 
 
 http://forum.world.st/ZnLineReader-set-limit-when-reading-a-header-td4649479.html#a4649489
 
  My question is: that thread was created in 2012, perhaps today you have
  another alternative/idea to override it globally in ZNConstants. I want
 to
  avoid this.
 
  The situation is:
 
  I use lesscss. This creates a style tag like this:
 
 
 
  With a button click like this:
 
  html button
  onClick: (html jQuery ajax callback: [ :eventData | ( Delay forSeconds:
 10)
  wait. eventData inspect  ] value: (JSStream
  on:'jQuery(''#less\\:files-RKALibrary-mainStylesFile'').text()'));
  script: html jQuery this button;
  with: 'CSS File generieren'
 
  I want to get the very very long css file string and use it (to create
 a
  css file from it).
 
  This action is done not so often and I don't want to override the limit
 it
  for all requests.
  I would have to change it to at least 15 instead of currently 4096.
 I
  assume this would not be a good solution...
 
  OTOH, this will be used only while a redesign is done, before going
  productive. So, in the worst case I will change it for 4 weeks during
  redesign. What do you think, does that make sense?
 
  Background: I wrote a less editor for my app and the css designer will
 be
  able to edit the less code and see the changes immediately in the
  application.
 
  Regards
  Sabine
 
 
 
 
 
  --
  View this message in context:
 http://forum.world.st/ZnLineTooLong-override-alternative-tp4766100.html
  Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
 




 --
  If you reply to this email, your message will be added to the discussion
 below:

 http://forum.world.st/ZnLineTooLong-override-alternative-tp4766100p4766309.html
  To start a new topic under Pharo Smalltalk Users, email
 ml-node+s1294792n1310670...@n4.nabble.com
 To unsubscribe from Pharo Smalltalk Users, click here
 http://forum.world.st/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=1310670code=c2FiaW5lLmtub2VmZWxAZ21haWwuY29tfDEzMTA2NzB8MTA0OTM5MTYx
 .
 NAML
 http://forum.world.st/template/NamlServlet.jtp?macro=macro_viewerid=instant_html%21nabble%3Aemail.namlbase=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespacebreadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml





--
View this message in context: 
http://forum.world.st/ZnLineTooLong-override-alternative-tp4766100p4766320.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.

[Pharo-users] ZnLineTooLong override alternative?

2014-07-02 Thread Sabine Knöfel
Hi Sven, all,

I ran into the same problem as described here:

http://forum.world.st/ZnLineReader-set-limit-when-reading-a-header-td4649479.html#a4649489

My question is: that thread was created in 2012, perhaps today you have
another alternative/idea to override it globally in ZNConstants. I want to
avoid this.

The situation is:

I use lesscss. This creates a style tag like this: 



With a button click like this:

html button
onClick: (html jQuery ajax callback: [ :eventData | ( Delay forSeconds: 
10)
wait. eventData inspect  ] value: (JSStream
on:'jQuery(''#less\\:files-RKALibrary-mainStylesFile'').text()'));
script: html jQuery this button;
with: 'CSS File generieren'

I want to get the very very long css file string and use it (to create a
css file from it).

This action is done not so often and I don't want to override the limit it
for all requests.
I would have to change it to at least 15 instead of currently 4096. I
assume this would not be a good solution...

OTOH, this will be used only while a redesign is done, before going
productive. So, in the worst case I will change it for 4 weeks during
redesign. What do you think, does that make sense?

Background: I wrote a less editor for my app and the css designer will be
able to edit the less code and see the changes immediately in the
application.

Regards 
Sabine





--
View this message in context: 
http://forum.world.st/ZnLineTooLong-override-alternative-tp4766100.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.



Re: [Pharo-users] [Pharo-dev] Changed semantics for mongo ObjectID

2014-05-12 Thread Sabine Knöfel
Hi Norbert,

what about objects which have been written to mongo with the old version
and will be read with the new version. Can they be read/found with the new
version? Or is there a migration needed?

Regards
Sabine



On Thu, May 8, 2014 at 11:30 PM, Norbert Hartl norb...@hartl.name wrote:

 I needed to change the way ObjectIds are read from and written to BSON.
 BSON is a format that encodes its byte contents little endian. In mongo
 database the format of ObjectIds is different. The way an ObjectId is
 encoded is big endian. You can see this if you compare the outputs for an
 object when read from mongo shell and from pharo. The ids won’t match.

 If you do „normal“ stuff with mongo it is unlikely you have noticed the
 effect. An OID is read the wrong way but also written the wrong way which
 makes it right again from the mongo database perspective. But it won’t work
 if you use a mixed query setting. Meaning reading an OID and requesting the
 database using javascript expression. This will fail.

 I’m writing this because I’m not sure the change can break existing
 software. The change is not included in the stable version, yet. If you
 want to test then load #bleedingEdge and report any problem that might
 occur. I will use the new behaviour and will take the freedom to make it
 stable if it works for some time.

 FYI,

 Norbert





Re: [Pharo-users] [Pharo-dev] Changed semantics for mongo ObjectID

2014-05-12 Thread Sabine Knöfel
Thanks, Norbert!


On Mon, May 12, 2014 at 11:38 AM, Norbert Hartl norb...@hartl.name wrote:


 Am 12.05.2014 um 10:46 schrieb Sabine Knöfel sabine.knoe...@gmail.com:

 Hi Norbert,

 what about objects which have been written to mongo with the old version
 and will be read with the new version. Can they be read/found with the new
 version? Or is there a migration needed?


 I’d say it should be safe just to upgrade the code. The exisiting ids
 won’t change because encoding and decoding are always fully reversible.
 Meaning regardless of the encoding scheme the ids are the same in the
 database after being read and written. The only thing changes is the value
 in the OID object in your image. There are two ways where this can fail.
 Either you monkey with id values inside your code. Or you use manual
 references to objects where the referenced id is not written as OID.
 Everything else should be the same with the old and the new code.
 In the meantime I even changed the generation of the id value to reflect
 the mongo spec. Now the values should be comparable to what other drivers
 (including mongo shell) are generating. This also means you can now ask
 your ObjectId about its timestamp. Which of course gives you non-sense with
 ids generated prior to the code update..

 Norbert



 On Thu, May 8, 2014 at 11:30 PM, Norbert Hartl norb...@hartl.name wrote:

 I needed to change the way ObjectIds are read from and written to BSON.
 BSON is a format that encodes its byte contents little endian. In mongo
 database the format of ObjectIds is different. The way an ObjectId is
 encoded is big endian. You can see this if you compare the outputs for an
 object when read from mongo shell and from pharo. The ids won’t match.

 If you do „normal“ stuff with mongo it is unlikely you have noticed the
 effect. An OID is read the wrong way but also written the wrong way which
 makes it right again from the mongo database perspective. But it won’t work
 if you use a mixed query setting. Meaning reading an OID and requesting the
 database using javascript expression. This will fail.

 I’m writing this because I’m not sure the change can break existing
 software. The change is not included in the stable version, yet. If you
 want to test then load #bleedingEdge and report any problem that might
 occur. I will use the new behaviour and will take the freedom to make it
 stable if it works for some time.

 FYI,

 Norbert







Re: [Pharo-users] Voyage: how to delete references to objects.

2014-04-17 Thread Sabine Knöfel
Hi Olivier,

possibly the option
VOMongoContainerenableMissingContent;
is useful to avoid
http://forum.world.st/Voyage-image-freeze-VOMongoError-Lazy-reference-not-found-td4703739.html

Here is an example:
http://esug.org/data/ESUG2013/4-Thu/03-ESUG2013%20-%20VoyageTutorial.pdf

Regards
Sabine




On Thu, Apr 17, 2014 at 3:07 PM, Olivier Auverlot [via Smalltalk] 
ml-node+s1294792n4755092...@n4.nabble.com wrote:

 thanks Robert for the explications.

 I agree with you that's the best way to remove a book is to delete the
 reference in  ComicsCollection.

 But how to do that ? Must I simply remove the reference in the ordered
 collection ? Voyage will syncronize automatically the data in memory with
 the content of the database ? Must I force the save of the data after
 removing the reference ?

 Olivier ;-)


 2014-04-17 14:10 GMT+02:00 Norbert Hartl [hidden 
 email]http://user/SendEmail.jtp?type=nodenode=4755092i=0
 :


 Am 17.04.2014 um 13:53 schrieb olivier [hidden 
 email]http://user/SendEmail.jtp?type=nodenode=4755092i=1
 :

  Hi,
 
  I'm using Voyage in a Pharo application.
 
  I have two MongoDB collections which are ComicsCollection and
 ComicsBook. Each book is attached to a instance of ComicsCollection. The
 reference of each book is stored in an ordered collection (in the instance
 of ComicsCollection). The problem is that if I remove a book, the reference
 to the book is not deleted from ComicsCollection.
 
  How can I remove properly a book and the reference to the book ?
 
 From the smalltalk image view the problem is usually exactly the
 opposite: You don’t delete objects but you remove references to them. As
 voyage maps objects it is a good idea to stay in the object realm. So you
 should rather remove the book from the collection. This way you won’t get
 errors just garbage. The „real“ problem that arises then is that the book
 would still be in the database. Just like it is in the image but there is
 no garbage collector for mongo. To decide that from the image is not
 possible. You load only a sub graph from the database into image memory. So
 you don’t know if there are other objects referencing the book.

 If your records fit all in memory you could load all collections and
 books and build the difference between all referenced books in the
 collections and the total amount of books. The difference will be the set
 of objects not being referenced by a collection and those can be deleted.

 If the records do not fit in memory an alternative strategy would be
 needed. I started to research if it is possible to build a map/reduce based
 garbage collector for common cases but got distracted. But I have the same
 problem so I will need to pick it up some time.

 hope that helps,

 Norbert





 --
  If you reply to this email, your message will be added to the discussion
 below:

 http://forum.world.st/Voyage-how-to-delete-references-to-objects-tp4755088p4755092.html
  To start a new topic under Pharo Smalltalk Users, email
 ml-node+s1294792n1310670...@n4.nabble.com
 To unsubscribe from Pharo Smalltalk Users, click 
 herehttp://forum.world.st/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=1310670code=c2FiaW5lLmtub2VmZWxAZ21haWwuY29tfDEzMTA2NzB8MTA0OTM5MTYx
 .
 NAMLhttp://forum.world.st/template/NamlServlet.jtp?macro=macro_viewerid=instant_html%21nabble%3Aemail.namlbase=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespacebreadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml





--
View this message in context: 
http://forum.world.st/Voyage-how-to-delete-references-to-objects-tp4755088p4755097.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.

Re: [Pharo-users] Voyage: how to delete references to objects.

2014-04-17 Thread Sabine Knöfel
Hi Norbert,

for me the gain within smalltalk is huge because I want to navigate from
person to trip and from trip to person by the attributes without asking
mongo for the correspondent object via indexes.

Don't you think that this is a question of design of the object model and
should not be decided by database arguments?

Regards
Sabine


On Thu, Apr 17, 2014 at 3:40 PM, NorbertHartl [via Smalltalk] 
ml-node+s1294792n4755102...@n4.nabble.com wrote:

 Sabine,

 I read the case now the first time. Just one note. Having references in
 both directions is probably not the best idea if using a non-object store.
 For navigating the graph it might be good but for persisting it is not. The
 serialization is a lot more complex if you do and the gain is nothing. For
 most databases with proper indexes you can request both directions easily
 and fast. So having one reference pointing from A to B you get the opposite
 direction for free.

 Norbert

 Am 17.04.2014 um 15:22 schrieb Sabine Knöfel [hidden 
 email]http://user/SendEmail.jtp?type=nodenode=4755102i=0
 :

 Hi Olivier,

 possibly the option
 VOMongoContainerenableMissingContent;
 is useful to avoid

 http://forum.world.st/Voyage-image-freeze-VOMongoError-Lazy-reference-not-found-td4703739.html

 Here is an example:
 http://esug.org/data/ESUG2013/4-Thu/03-ESUG2013%20-%20VoyageTutorial.pdf

 Regards
 Sabine




 On Thu, Apr 17, 2014 at 3:07 PM, Olivier Auverlot [via Smalltalk] a
 href=x-msg://56/user/SendEmail.jtp?type=nodeamp;node=4755097amp;i=0
 target=_top rel=nofollow link=external[hidden email] wrote:

 thanks Robert for the explications.

 I agree with you that's the best way to remove a book is to delete the
 reference in  ComicsCollection.

 But how to do that ? Must I simply remove the reference in the ordered
 collection ? Voyage will syncronize automatically the data in memory with
 the content of the database ? Must I force the save of the data after
 removing the reference ?

 Olivier ;-)


 2014-04-17 14:10 GMT+02:00 Norbert Hartl [hidden 
 email]http://user/SendEmail.jtp?type=nodenode=4755092i=0
 :


 Am 17.04.2014 um 13:53 schrieb olivier [hidden 
 email]http://user/SendEmail.jtp?type=nodenode=4755092i=1
 :

  Hi,
 
  I'm using Voyage in a Pharo application.
 
  I have two MongoDB collections which are ComicsCollection and
 ComicsBook. Each book is attached to a instance of ComicsCollection. The
 reference of each book is stored in an ordered collection (in the instance
 of ComicsCollection). The problem is that if I remove a book, the reference
 to the book is not deleted from ComicsCollection.
 
  How can I remove properly a book and the reference to the book ?
 
 From the smalltalk image view the problem is usually exactly the
 opposite: You don’t delete objects but you remove references to them. As
 voyage maps objects it is a good idea to stay in the object realm. So you
 should rather remove the book from the collection. This way you won’t get
 errors just garbage. The „real“ problem that arises then is that the book
 would still be in the database. Just like it is in the image but there is
 no garbage collector for mongo. To decide that from the image is not
 possible. You load only a sub graph from the database into image memory. So
 you don’t know if there are other objects referencing the book.

 If your records fit all in memory you could load all collections and
 books and build the difference between all referenced books in the
 collections and the total amount of books. The difference will be the set
 of objects not being referenced by a collection and those can be deleted.

 If the records do not fit in memory an alternative strategy would be
 needed. I started to research if it is possible to build a map/reduce based
 garbage collector for common cases but got distracted. But I have the same
 problem so I will need to pick it up some time.

 hope that helps,

 Norbert





 --
  If you reply to this email, your message will be added to the
 discussion below:

 http://forum.world.st/Voyage-how-to-delete-references-to-objects-tp4755088p4755092.html
  To start a new topic under Pharo Smalltalk Users, email a
 href=x-msg://56/user/SendEmail.jtp?type=nodeamp;node=4755097amp;i=1
 target=_top rel=nofollow link=external[hidden email]
  To unsubscribe from Pharo Smalltalk Users, click here.
 NAMLhttp://forum.world.st/template/NamlServlet.jtp?macro=macro_viewerid=instant_html%21nabble%3Aemail.namlbase=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespacebreadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml



 --
 View this message in context: Re: Voyage: how to delete references to
 objects.http://forum.world.st/Voyage-how-to-delete-references-to-objects-tp4755088p4755097.html
 Sent from the Pharo Smalltalk Users mailing list 
 archivehttp

Re: [Pharo-users] find used deprecated methods when moving from pharo2 to pharo3

2014-01-17 Thread Sabine Knöfel
Hi Andre,

thanks, I used it and it worked fine but as you said - several methods are
not covered.

Sabine


On Thu, Jan 16, 2014 at 2:02 PM, Andre Hora [via Smalltalk] 
ml-node+s1294792n4737198...@n4.nabble.com wrote:

 Hello Sabine,

 I have a set of smalllint rules I have created by mining code history
 between Pharo 2.0 and 3.0.
 Note however they do not cover all deprecated methods and classes.

 If you want to give a try, just load them (using the code below), and run
 the rules using the Critic Browser to find the violations and the
 replacement **suggestion**.

 Gofer new
url: 'http://www.smalltalkhub.com/mc/andrehora/APIEvolutionMiner/main';
package: 'Rules-Pharo30';
load.

 The is also this report for a fast overview of the changes (note that some
 may be false positives):
 https://ci.inria.fr/rmod/view/MinedRules/job/Pharo30-Report/Pharo_3.0_Rules

 hope that it helps,

 --
 Andre Hora


 On Thu, Jan 16, 2014 at 12:21 PM, Sabine Knöfel [hidden 
 email]http://user/SendEmail.jtp?type=nodenode=4737198i=0
  wrote:

 Hi,

 I am currently moving my application from pharo2 to pharo3.

 I am asking myself if there is an easy way to find all deprecated methods
 I
 used in my app.
 The only way I see currently is to use the app and testing for walkbacks
 and
 run the test cases.

 How did others manage this?

 Sabine



 --
 View this message in context:
 http://forum.world.st/find-used-deprecated-methods-when-moving-from-pharo2-to-pharo3-tp4737174.html
 Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.




 --
 Andre Hora


 --
  If you reply to this email, your message will be added to the discussion
 below:

 http://forum.world.st/find-used-deprecated-methods-when-moving-from-pharo2-to-pharo3-tp4737174p4737198.html
  To start a new topic under Pharo Smalltalk Users, email
 ml-node+s1294792n1310670...@n4.nabble.com
 To unsubscribe from Pharo Smalltalk Users, click 
 herehttp://forum.world.st/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=1310670code=c2FiaW5lLmtub2VmZWxAZ21haWwuY29tfDEzMTA2NzB8MTA0OTM5MTYx
 .
 NAMLhttp://forum.world.st/template/NamlServlet.jtp?macro=macro_viewerid=instant_html%21nabble%3Aemail.namlbase=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespacebreadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml





--
View this message in context: 
http://forum.world.st/find-used-deprecated-methods-when-moving-from-pharo2-to-pharo3-tp4737174p4737478.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.

Re: [Pharo-users] find used deprecated methods when moving from pharo2 to pharo3

2014-01-17 Thread Sabine Knöfel
Hi Ben,

ok, I collect all I find and will report them after finishing.

maybe it would be good for the opening screen of the Pharo 3 release to
link to a tutorial on how to run those Deprecated-Rules-only on a package.

The description was clear and easy. I am not sure if I understood.
I made a movie with an example, do you think sth like this?
http://www.youtube.com/watch?v=0xHakeFo4ns

(BTW adding only Pharo3 was not possible - walkback)

Sabine




On Fri, Jan 17, 2014 at 1:50 PM, btc [via Smalltalk] 
ml-node+s1294792n4737498...@n4.nabble.com wrote:

 Can you report those to be added?

 btw, maybe it would be good for the opening screen of the Pharo 3 release
 to link to a tutorial on how to run those Deprecated-Rules-only on a
 package.

 cheers -ben

 Sabine Knöfel wrote:

 Hi Andre,

  thanks, I used it and it worked fine but as you said - several methods
 are not covered.

  Sabine


 On Thu, Jan 16, 2014 at 2:02 PM, Andre Hora [via Smalltalk] [hidden
 email] http://user/SendEmail.jtp?type=nodenode=4737478i=0 wrote:

  Hello Sabine,

  I have a set of smalllint rules I have created by mining code history
 between Pharo 2.0 and 3.0.
 Note however they do not cover all deprecated methods and classes.

  If you want to give a try, just load them (using the code below), and
 run the rules using the Critic Browser to find the violations and the
 replacement **suggestion**.

  Gofer new
url: 'http://www.smalltalkhub.com/mc/andrehora/APIEvolutionMiner/main
 ';
package: 'Rules-Pharo30';
load.

  The is also this report for a fast overview of the changes (note that
 some may be false positives):

 https://ci.inria.fr/rmod/view/MinedRules/job/Pharo30-Report/Pharo_3.0_Rules

  hope that it helps,

  --
 Andre Hora


  On Thu, Jan 16, 2014 at 12:21 PM, Sabine Knöfel [hidden 
 email]http://user/SendEmail.jtp?type=nodenode=4737198i=0
  wrote:

 Hi,

 I am currently moving my application from pharo2 to pharo3.

 I am asking myself if there is an easy way to find all deprecated
 methods I
 used in my app.
 The only way I see currently is to use the app and testing for walkbacks
 and
 run the test cases.

 How did others manage this?

 Sabine



  --
 View this message in context:
 http://forum.world.st/find-used-deprecated-methods-when-moving-from-pharo2-to-pharo3-tp4737174.html
 Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.




  --
 Andre Hora


 --
  If you reply to this email, your message will be added to the
 discussion below:

 http://forum.world.st/find-used-deprecated-methods-when-moving-from-pharo2-to-pharo3-tp4737174p4737198.html
   To start a new topic under Pharo Smalltalk Users, email [hidden 
 email]http://user/SendEmail.jtp?type=nodenode=4737478i=1
 To unsubscribe from Pharo Smalltalk Users, click here.
 NAMLhttp://forum.world.st/template/NamlServlet.jtp?macro=macro_viewerid=instant_html%21nabble%3Aemail.namlbase=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespacebreadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml



 --
 View this message in context: Re: find used deprecated methods when
 moving from pharo2 to 
 pharo3http://forum.world.st/find-used-deprecated-methods-when-moving-from-pharo2-to-pharo3-tp4737174p4737478.html

 Sent from the Pharo Smalltalk Users mailing list 
 archivehttp://forum.world.st/Pharo-Smalltalk-Users-f1310670.htmlat 
 Nabble.com.




 --
  If you reply to this email, your message will be added to the discussion
 below:

 http://forum.world.st/find-used-deprecated-methods-when-moving-from-pharo2-to-pharo3-tp4737174p4737498.html
  To start a new topic under Pharo Smalltalk Users, email
 ml-node+s1294792n1310670...@n4.nabble.com
 To unsubscribe from Pharo Smalltalk Users, click 
 herehttp://forum.world.st/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=1310670code=c2FiaW5lLmtub2VmZWxAZ21haWwuY29tfDEzMTA2NzB8MTA0OTM5MTYx
 .
 NAMLhttp://forum.world.st/template/NamlServlet.jtp?macro=macro_viewerid=instant_html%21nabble%3Aemail.namlbase=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespacebreadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml





--
View this message in context: 
http://forum.world.st/Re-find-used-deprecated-methods-when-moving-from-pharo2-to-pharo3-tp4737567.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.

Re: [Pharo-users] (MimeConverter forEncoding: 'quoted-printable') subclass responsibility

2013-12-09 Thread Sabine Knöfel
Hi Joachim, hi Sven,

thank yor very much for your work! I am looking forward to use Pharo 3.0
next year. :-)

Sabine


On Mon, Dec 9, 2013 at 11:11 AM, jtuchel [via Smalltalk] 
ml-node+s1294792n4728698...@n4.nabble.com wrote:

 Hi Sven,

 thanks for porting this and making it available. I will re-integrate
 your improvements in the VAST code if that's okay with you.

 Hey, and I am now (very indirectly) a Pharo contributor, how cool! ;-)))

 Joachim


 Am 08.12.13 23:49, schrieb Sven Van Caekenberghe:

  On 08 Dec 2013, at 19:51, Sven Van Caekenberghe [hidden 
  email]http://user/SendEmail.jtp?type=nodenode=4728698i=0
 wrote:
 
  Next I will actually move your code to the instance side of
 QuotedPrintableMimeConverter, the class where we actually need it. I am
 sure I can take over your units tests as they are, which is good.
  Done:
 
 
 https://pharo.fogbugz.com/f/cases/4825/Quoted-printable-encoding-incomplete
 
  RESOLVED
 
  Slice in 3.0 inbox:
 
  ===
  Name:
 SLICE-Issue-4825-Quoted-printable-encoding-incomplete-SvenVanCaekenberghe.1
  Author: SvenVanCaekenberghe
  Time: 8 December 2013, 11:45:09.148454 pm
  UUID: af015099-e48b-47f5-9553-840fca62d8e2
  Ancestors:
  Dependencies: Network-MIME-SvenVanCaekenberghe.64,
 NetworkTests-SvenVanCaekenberghe.92
 
  A completely new implementation of QuotedPrintableMimeConverter based on
 code contributed by Joachim Tuchel (thanks !) including a new set of unit
 tests.
 
  Note that the older code lacked the encoding part and had no tests at
 all.
  ===
 
  Sven


 --
 ---
 Objektfabrik Joachim Tuchel  mailto:[hidden 
 email]http://user/SendEmail.jtp?type=nodenode=4728698i=1
 Fliederweg 1 http://www.objektfabrik.de
 D-71640 Ludwigsburg  http://joachimtuchel.wordpress.com
 Telefon: +49 7141 56 10 86 0 Fax: +49 7141 56 10 86 1




 --
  If you reply to this email, your message will be added to the discussion
 below:

 http://forum.world.st/MimeConverter-forEncoding-quoted-printable-subclass-responsibility-tp4727895p4728698.html
  To start a new topic under Pharo Smalltalk Users, email
 ml-node+s1294792n1310670...@n4.nabble.com
 To unsubscribe from (MimeConverter forEncoding: 'quoted-printable')
 subclass responsibility, click 
 herehttp://forum.world.st/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=4727895code=c2FiaW5lLmtub2VmZWxAZ21haWwuY29tfDQ3Mjc4OTV8MTA0OTM5MTYx
 .
 NAMLhttp://forum.world.st/template/NamlServlet.jtp?macro=macro_viewerid=instant_html%21nabble%3Aemail.namlbase=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespacebreadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml





--
View this message in context: 
http://forum.world.st/MimeConverter-forEncoding-quoted-printable-subclass-responsibility-tp4727895p4728721.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.

[Pharo-users] (MimeConverter forEncoding: 'quoted-printable') subclass responsibility

2013-12-06 Thread Sabine Knöfel
Hi, 

I need this, too.

http://forum.world.st/Issue-4782-Quoted-printable-encoding-incomplete-implementation-td3823737.html

The bug was closed after transferring it to fogbugs:

https://pharo.fogbugz.com/f/cases/4825

Sebastian, may I ask you, how did you solve this?

regards
Sabine




--
View this message in context: 
http://forum.world.st/MimeConverter-forEncoding-quoted-printable-subclass-responsibility-tp4727895.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.



Re: [Pharo-users] (MimeConverter forEncoding: 'quoted-printable') subclass responsibility

2013-12-06 Thread Sabine Knöfel
Hi Sven,

this would be great.

I need it for sending mails and some mail reader, e.g. Thunderbird on Mac
(Thank you Joachim for reporting this bug :-) ) need this in the subject if
there are special signs in it.

Example:
Subject: =?ISO-8859-1?Q?Kindle_f=FCr_nur_49_EUR?=

Regards
Sabine


On Fri, Dec 6, 2013 at 10:54 AM, Sven Van Caekenberghe-2 [via Smalltalk] 
ml-node+s1294792n4727919...@n4.nabble.com wrote:

 Yes, indeed

 QuotedPrintableMimeConverter#mimeEncode is missing.

 It shouldn’t be too hard to implement, although it is a bit of a ‘human’
 format rather than a technical one.

 http://en.wikipedia.org/wiki/Quoted-printable

 I’ll see what I can do.

 Sven

 On 06 Dec 2013, at 09:35, Sabine Knöfel [hidden 
 email]http://user/SendEmail.jtp?type=nodenode=4727919i=0
 wrote:

  Hi,
 
  I need this, too.
 
 
 http://forum.world.st/Issue-4782-Quoted-printable-encoding-incomplete-implementation-td3823737.html
 
  The bug was closed after transferring it to fogbugs:
 
  https://pharo.fogbugz.com/f/cases/4825
 
  Sebastian, may I ask you, how did you solve this?
 
  regards
  Sabine
 
 
 
 
  --
  View this message in context:
 http://forum.world.st/MimeConverter-forEncoding-quoted-printable-subclass-responsibility-tp4727895.html
  Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
 




 --
  If you reply to this email, your message will be added to the discussion
 below:

 http://forum.world.st/MimeConverter-forEncoding-quoted-printable-subclass-responsibility-tp4727895p4727919.html
  To start a new topic under Pharo Smalltalk Users, email
 ml-node+s1294792n1310670...@n4.nabble.com
 To unsubscribe from (MimeConverter forEncoding: 'quoted-printable')
 subclass responsibility, click 
 herehttp://forum.world.st/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=4727895code=c2FiaW5lLmtub2VmZWxAZ21haWwuY29tfDQ3Mjc4OTV8MTA0OTM5MTYx
 .
 NAMLhttp://forum.world.st/template/NamlServlet.jtp?macro=macro_viewerid=instant_html%21nabble%3Aemail.namlbase=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespacebreadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml





--
View this message in context: 
http://forum.world.st/MimeConverter-forEncoding-quoted-printable-subclass-responsibility-tp4727895p4727928.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.

Re: [Pharo-users] command line command from pharo image

2013-12-06 Thread Sabine Knöfel
Nicolai,

thank you very much for clarification. Indeed: there was a silly error in
my command when copying it from Mac to windows (path) and the notepad test
worked. So the problem is solved for me. I can call from Mac OS and from
Windows and I am happy:-)

Regards
Sabine


On Fri, Dec 6, 2013 at 1:43 PM, Nicolai Hess [via Smalltalk] 
ml-node+s1294792n4727984...@n4.nabble.com wrote:

 2013/12/6 Sabine Knöfel [hidden 
 email]http://user/SendEmail.jtp?type=nodenode=4727984i=0
 

 Hi Torsten, Sean,

 http://smalltalkhub.com/#!/~OS/OS-Windows
 looks great.

 I have not found a solution yet to send a call to OS from pharo (I develop
 with mac since a few weeks now and deployment is currently windows) and I
 am
 thinking about moving to Pharo 3.0 for further development due to the OS
 call problem.

 Do you think, Pharo 3.0 is ready to use it for development or should I
 wait
 and look for another solution?

 Regards
 Sabine



 --
 View this message in context:
 http://forum.world.st/command-line-command-from-pharo-image-tp4727751p4727902.html
 Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.



 Hi,

 Pharo2 doesn't work for you?
 I tried both Pharo2 and 3.

 In
 Pharo2.0
 Latest update: #20593
 with latest stable OSProcess loaded form ConfigurationManager
 I can execute
 OSProcess command:'notepad.exe'

 without problems.

 But only as long as the command can be found otherwise
 ExternalWindowsOSProcess tries to write
 that error message to ExternalWindowsOSProcessinitialStdErr.
 And this does not work. (And it doesn't work in Pharo3)
 (bug StdErr not working on Windows
 https://pharo.fogbugz.com/default.asp?11615)




 --
  If you reply to this email, your message will be added to the discussion
 below:

 http://forum.world.st/command-line-command-from-pharo-image-tp4727751p4727984.html
  To start a new topic under Pharo Smalltalk Users, email
 ml-node+s1294792n1310670...@n4.nabble.com
 To unsubscribe from command line command from pharo image, click 
 herehttp://forum.world.st/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=4727751code=c2FiaW5lLmtub2VmZWxAZ21haWwuY29tfDQ3Mjc3NTF8MTA0OTM5MTYx
 .
 NAMLhttp://forum.world.st/template/NamlServlet.jtp?macro=macro_viewerid=instant_html%21nabble%3Aemail.namlbase=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespacebreadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml





--
View this message in context: 
http://forum.world.st/command-line-command-from-pharo-image-tp4727751p4728032.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.

Re: [Pharo-users] command line command from pharo image

2013-12-04 Thread Sabine Knöfel
Hi Sean,

thanks.

I need it now, on Pharo 2.0 but I will change it when I move to 3.0.
Which is the Class and the message in NB then?

Sabine


On Tue, Dec 3, 2013 at 5:40 PM, Sean P. DeNigris [via Smalltalk] 
ml-node+s1294792n4727098...@n4.nabble.com wrote:

  Sabine Knöfel wrote
  OSProcess thisOSProcess

 You can remove the send of #thisOSProcess and it will still work. Also, if
 you don't care about output, you can use NB without installing anything. In
 Pharo 3.0, it works on Windows, will work on Mac with Igor's latest
 changes... not sure about Linux...

 HTH
 Cheers,
 Sean


 --
  If you reply to this email, your message will be added to the discussion
 below:

 http://forum.world.st/command-line-command-from-pharo-image-tp4727022p4727098.html
  To start a new topic under Pharo Smalltalk Users, email
 ml-node+s1294792n1310670...@n4.nabble.com
 To unsubscribe from command line command from pharo image, click 
 herehttp://forum.world.st/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=4727022code=c2FiaW5lLmtub2VmZWxAZ21haWwuY29tfDQ3MjcwMjJ8MTA0OTM5MTYx
 .
 NAMLhttp://forum.world.st/template/NamlServlet.jtp?macro=macro_viewerid=instant_html%21nabble%3Aemail.namlbase=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespacebreadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml





--
View this message in context: 
http://forum.world.st/command-line-command-from-pharo-image-tp4727022p4727311.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.

[Pharo-users] command line command from pharo image

2013-12-03 Thread Sabine Knöfel
Hi,

how can I perform a commandline command from within Pharo?

Sabine



--
View this message in context: 
http://forum.world.st/command-line-command-from-pharo-image-tp4727022.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.



Re: [Pharo-users] command line command from pharo image

2013-12-03 Thread Sabine Knöfel
Hi,

Uko2 is right, I want to call an os command (esteban: mongodump) from
within Pharo.

Sabine


On Tue, Dec 3, 2013 at 2:52 PM, Uko2 [via Smalltalk] 
ml-node+s1294792n4727029...@n4.nabble.com wrote:

 I think the question was how do you do that worm *within* Pharo. Not
 Pharo from command line

 Uko


 On 03 Dec 2013, at 14:48, Esteban Lorenzano [hidden 
 email]http://user/SendEmail.jtp?type=nodenode=4727029i=0
 wrote:

 depends on the kind of command line :)

 the most easy way is to do something like:

 ./pharo Pharo.image eval 42 factorial

 Esteban


 On Tue, Dec 3, 2013 at 2:45 PM, Sabine Knöfel [hidden 
 email]http://user/SendEmail.jtp?type=nodenode=4727029i=1
  wrote:

 Hi,

 how can I perform a commandline command from within Pharo?

 Sabine



 --
 View this message in context:
 http://forum.world.st/command-line-command-from-pharo-image-tp4727022.html
 Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.





 --
  If you reply to this email, your message will be added to the discussion
 below:

 http://forum.world.st/command-line-command-from-pharo-image-tp4727022p4727029.html
  To start a new topic under Pharo Smalltalk Users, email
 ml-node+s1294792n1310670...@n4.nabble.com
 To unsubscribe from command line command from pharo image, click 
 herehttp://forum.world.st/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=4727022code=c2FiaW5lLmtub2VmZWxAZ21haWwuY29tfDQ3MjcwMjJ8MTA0OTM5MTYx
 .
 NAMLhttp://forum.world.st/template/NamlServlet.jtp?macro=macro_viewerid=instant_html%21nabble%3Aemail.namlbase=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespacebreadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml





--
View this message in context: 
http://forum.world.st/command-line-command-from-pharo-image-tp4727022p4727030.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.

Re: [Pharo-users] command line command from pharo image

2013-12-03 Thread Sabine Knöfel
Hi,

the mailinglist is so helpful! Its really great!

CommandShell is my solution.

Thanks!
Sabine




On Tue, Dec 3, 2013 at 3:00 PM, Sergi Reyner [via Smalltalk] 
ml-node+s1294792n4727033...@n4.nabble.com wrote:

 2013/12/3 Sabine Knöfel [hidden 
 email]http://user/SendEmail.jtp?type=nodenode=4727033i=0
 

 Hi,

 how can I perform a commandline command from within Pharo?


 Check OSProcess and CommandShell.

 Cheers,
 Sergi



 --
  If you reply to this email, your message will be added to the discussion
 below:

 http://forum.world.st/command-line-command-from-pharo-image-tp4727022p4727033.html
  To start a new topic under Pharo Smalltalk Users, email
 ml-node+s1294792n1310670...@n4.nabble.com
 To unsubscribe from command line command from pharo image, click 
 herehttp://forum.world.st/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=4727022code=c2FiaW5lLmtub2VmZWxAZ21haWwuY29tfDQ3MjcwMjJ8MTA0OTM5MTYx
 .
 NAMLhttp://forum.world.st/template/NamlServlet.jtp?macro=macro_viewerid=instant_html%21nabble%3Aemail.namlbase=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespacebreadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml





--
View this message in context: 
http://forum.world.st/command-line-command-from-pharo-image-tp4727022p4727049.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.

Re: [Pharo-users] command line command from pharo image

2013-12-03 Thread Sabine Knöfel
Hi Esteban,

yes, like this:

 OSProcess thisOSProcess
command:
 ('{1}mongodump  --out {2}'
format:
{
 RKAConfiguration databaseUtilsPath.
(RKAConfiguration databaseBackupPath )}).

Cheers
Sabine


On Tue, Dec 3, 2013 at 4:28 PM, EstebanLM [via Smalltalk] 
ml-node+s1294792n4727066...@n4.nabble.com wrote:

 ah :)

 then you need OSProcess.

 and I do not remember exactly how it was, but something like this:

 OSProcess command:  'mycommand with parameters'.

 cheers,
 Esteban


 On Tue, Dec 3, 2013 at 3:29 PM, Yuriy Tymchuk [hidden 
 email]http://user/SendEmail.jtp?type=nodenode=4727066i=0
  wrote:


 On 03 Dec 2013, at 15:26, Sabine Knöfel [hidden 
 email]http://user/SendEmail.jtp?type=nodenode=4727066i=1
 wrote:

 Hi,

 the mailinglist is so helpful! Its really great!


 But it’s not well indexable and does not provide quality information
 about data. That’s why I encourage people to use Stack Overflow


 CommandShell is my solution.

 Thanks!
 Sabine




 On Tue, Dec 3, 2013 at 3:00 PM, Sergi Reyner [via Smalltalk] [hidden
 email] wrote:

 2013/12/3 Sabine Knöfel [hidden 
 email]http://user/SendEmail.jtp?type=nodenode=4727033i=0
 

 Hi,

 how can I perform a commandline command from within Pharo?


 Check OSProcess and CommandShell.

 Cheers,
 Sergi



 --
  If you reply to this email, your message will be added to the
 discussion below:

 http://forum.world.st/command-line-command-from-pharo-image-tp4727022p4727033.html
  To start a new topic under Pharo Smalltalk Users, email [hidden email]
 To unsubscribe from command line command from pharo image, click here.
 NAMLhttp://forum.world.st/template/NamlServlet.jtp?macro=macro_viewerid=instant_html%21nabble%3Aemail.namlbase=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespacebreadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml



 --
 View this message in context: Re: command line command from pharo 
 imagehttp://forum.world.st/command-line-command-from-pharo-image-tp4727022p4727049.html
 Sent from the Pharo Smalltalk Users mailing list 
 archivehttp://forum.world.st/Pharo-Smalltalk-Users-f1310670.htmlat
 Nabble.com.





 --
  If you reply to this email, your message will be added to the discussion
 below:

 http://forum.world.st/command-line-command-from-pharo-image-tp4727022p4727066.html
  To start a new topic under Pharo Smalltalk Users, email
 ml-node+s1294792n1310670...@n4.nabble.com
 To unsubscribe from command line command from pharo image, click 
 herehttp://forum.world.st/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=4727022code=c2FiaW5lLmtub2VmZWxAZ21haWwuY29tfDQ3MjcwMjJ8MTA0OTM5MTYx
 .
 NAMLhttp://forum.world.st/template/NamlServlet.jtp?macro=macro_viewerid=instant_html%21nabble%3Aemail.namlbase=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespacebreadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml





--
View this message in context: 
http://forum.world.st/command-line-command-from-pharo-image-tp4727022p4727068.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.

[Pharo-users] Mongo lost references - bug?

2013-12-02 Thread Sabine Knöfel
Hi Esteban, 

I found a problem in mongo/voyage and I have reduced and extracted it for
repro.
I ask for your opinion if this is a bug.

If you file in the code below, the method testDemo creates a simple model:
Paper has 1:1 reference to Planet.
Paper has 1:1 reference to Star.
Star has 1:N reference to Planet.
Star has 1:1 reference to Paper.
Planet has 1:1 reference to Paper.

If you run testDemo, you see that the model which was created is ok with
all its references.
(self assert: thePaper planet = thePaper star planets first.) == ok

If you reset the repository and load Paper from database with 
Paper select all 
and make the same check, the references are lost.

VORepository current reset.
theReloadedPaper := Paper selectAll first.
self assert: theReloadedPaper planet = theReloadedPaper star planets first
==not ok

But if you remove the comment within mongoPlanets
which leads to sending a message to the newly loaded object, then it works.

write: [ :star :planets | star planets: (planets select: [:each | each
someMethod])  ]);

Do I have to send a message to each of the instances after loading? I think
no.

If I did not understand correctly how to use voyage, please tell me.

Regards
Sabine




Object subclass: #Planet
instanceVariableNames: 'planetname star paper'
classVariableNames: ''
poolDictionaries: ''
category: 'RKA24-Demo'!

!Planet methodsFor: 'accessing' stamp: 'sabineknoefel 12/2/2013 12:05'!
paper
^ paper! !

!Planet methodsFor: 'accessing' stamp: 'sabineknoefel 12/2/2013 12:05'!
paper: anObject
paper := anObject! !

!Planet methodsFor: 'accessing' stamp: 'sabineknoefel 7/18/2013 16:17'!
planetname
^ planetname! !

!Planet methodsFor: 'accessing' stamp: 'sabineknoefel 7/18/2013 16:17'!
planetname: anObject
planetname := anObject! !

!Planet methodsFor: 'accessing' stamp: 'sabineknoefel 12/2/2013 11:53'!
star
^ star! !

!Planet methodsFor: 'accessing' stamp: 'sabineknoefel 12/2/2013 11:53'!
star: anObject
star := anObject! !


!Planet methodsFor: 'testing' stamp: 'sabineknoefel 12/2/2013 12:25'!
someMethod
^true! !

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- !

Planet class
instanceVariableNames: ''!

!Planet class methodsFor: 'as yet unclassified' stamp: 'sabineknoefel
7/18/2013 16:16'!
isVoyageRoot
^true! !

!Planet class methodsFor: 'as yet unclassified' stamp: 'sabineknoefel
12/2/2013 12:23'!
mongoStar
mongoDescription
^ VOMongoToOneDescription new
attributeName: 'star';
kind: Star;
accessor: (MAPluggableAccessor read: [ :planet | planet star ] 
write: [
:planet :star | planet star: star ]);
yourself! !

!Planet class methodsFor: 'as yet unclassified' stamp: 'sabineknoefel
12/2/2013 12:30'!
testDemo
self testDemo

| thePlanet theStar thePaper theReloadedPaper |
create simple model
thePaper := Paper new theme: 'a paper about 42'.
thePlanet := Planet new planetname: 'Orion'; paper: thePaper.
theStar := Star new starname: 'Betelgeuse'; paper: thePaper.
theStar addPlanet: thePlanet.
thePaper star: theStar.
thePaper planet: thePlanet.
thePaper save.

check references - ok
self assert: thePaper planet = thePaper star planets first.

VORepository current reset.
theReloadedPaper := Paper selectAll first.
references are lost now
self assert: theReloadedPaper planet = theReloadedPaper star planets 
first!
!


Object subclass: #Star
instanceVariableNames: 'starname planets paper'
classVariableNames: ''
poolDictionaries: ''
category: 'RKA24-Demo'!

!Star methodsFor: 'api' stamp: 'sabineknoefel 7/18/2013 16:21'!
addPlanet: aPlanet
self planets add: aPlanet.
aPlanet star: self! !


!Star methodsFor: 'accessing' stamp: 'sabineknoefel 12/2/2013 12:05'!
paper
^ paper! !

!Star methodsFor: 'accessing' stamp: 'sabineknoefel 12/2/2013 12:05'!
paper: anObject
paper := anObject! !

!Star methodsFor: 'accessing' stamp: 'sabineknoefel 7/18/2013 16:20'!
planets
planets ifNil: [ self planets: OrderedCollection new ].
^ planets! !

!Star methodsFor: 'accessing' stamp: 'sabineknoefel 7/18/2013 16:20'!
planets: anObject
planets := anObject! !

!Star methodsFor: 'accessing' stamp: 'sabineknoefel 7/18/2013 16:18'!
starname
^ starname! !

!Star methodsFor: 'accessing' stamp: 'sabineknoefel 7/18/2013 16:18'!
starname: anObject
starname := anObject! !

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- !

Star class
instanceVariableNames: ''!

!Star class methodsFor: 'as yet unclassified' stamp: 'sabineknoefel
7/18/2013 16:16'!
isVoyageRoot
^true! !

!Star class methodsFor: 'as yet unclassified' stamp: 'sabineknoefel
12/2/2013 12:31'!
mongoPlanets
remove 

[Pharo-users] Mongo cache vs database objects

2013-11-27 Thread Sabine Knöfel
Hi Esteban, all,

I work with mongo daily an it works fine, I am very happy with it.

As you told me, with
VORepository current reset.
I can force re loading all objects from database and resetting the cache
completely.
This is helpful for development eg. after changing the magritte
descriptions.

My question:
Is there a possibility to make a query and tell voyage that THIS query
should be done within the database and NOT within the cached objets? And
that all objects and the child objects from this query are loaded freshly
from database into the cache.

My concrete situation:
I want that if the user logs in, his objects are loaded from database and
NOT from cache. This means the person, his trips etc.

And the question coming along with this:
How long does the cache keeps objects/when are they reseted (except the
VORepository current reset)? 
If I would never take a new image and never make a reset, would all objects
remain in the image (and the database objects wold never be read)? In this
case what about the size of the image?

Regards
Sabine



--
View this message in context: 
http://forum.world.st/Mongo-cache-vs-database-objects-tp4725554.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.



Re: [Pharo-users] Mongo cache vs database objects

2013-11-27 Thread Sabine Knöfel
Hi Norbert,

thank you very much for the clarification.

I had to read it several times  but now I understand and I know what to
change in my model for this (something with references to objects which
have been deleted by the user).

Perhaps your answer is also interesting for the documentation of Johan.

Greets
Sabine


On Wed, Nov 27, 2013 at 1:44 PM, Norbert Hartl [via Smalltalk] 
ml-node+s1294792n4725577...@n4.nabble.com wrote:


 Am 27.11.2013 um 13:20 schrieb Sabine Knöfel [hidden 
 email]http://user/SendEmail.jtp?type=nodenode=4725577i=0:


  Hi Esteban, all,
 
  I work with mongo daily an it works fine, I am very happy with it.
 
  As you told me, with
  VORepository current reset.
  I can force re loading all objects from database and resetting the cache
  completely.
  This is helpful for development eg. after changing the magritte
  descriptions.
 
 Indeed. You need to flush/reset the repository in order to have new
 descriptions to take effect.

  My question:
  Is there a possibility to make a query and tell voyage that THIS query
  should be done within the database and NOT within the cached objets? And
  that all objects and the child objects from this query are loaded
 freshly
  from database into the cache.
 
 All queries go to the database. The cache is just used at resolve time.
 And it is necessary to have identical objects. Meaning you query the
 database directly and then objects are materialized. If the object is
 already in the cache the cached one is returned. Otherwise you would lose
 identity because having two requests containing the same object as a result
 would lead to two objects instead of one. You could only load trees instead
 of a graph.

  My concrete situation:
  I want that if the user logs in, his objects are loaded from database
 and
  NOT from cache. This means the person, his trips etc.
 
  And the question coming along with this:
  How long does the cache keeps objects/when are they reseted (except the
  VORepository current reset)?
  If I would never take a new image and never make a reset, would all
 objects
  remain in the image (and the database objects wold never be read)? In
 this
  case what about the size of the image?
 
 I’m not sure on this one. I think the cache does not clean anything. The
 thing about being able to load a graph I wrote above has also the
 constraint that all loaded objects that are still participating in the
 active graph need to be in the cache. But then the cache is a weak
 dictionary meaning that all objects leaving the active graph are removed
 from the cache (well at GC time, I think)

 Norbert

  Regards
  Sabine
 
 
 
  --
  View this message in context:
 http://forum.world.st/Mongo-cache-vs-database-objects-tp4725554.html
  Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
 




 --
  If you reply to this email, your message will be added to the discussion
 below:

 http://forum.world.st/Mongo-cache-vs-database-objects-tp4725554p4725577.html
  To start a new topic under Pharo Smalltalk Users, email
 ml-node+s1294792n1310670...@n4.nabble.com
 To unsubscribe from Mongo cache vs database objects, click 
 herehttp://forum.world.st/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=4725554code=c2FiaW5lLmtub2VmZWxAZ21haWwuY29tfDQ3MjU1NTR8MTA0OTM5MTYx
 .
 NAMLhttp://forum.world.st/template/NamlServlet.jtp?macro=macro_viewerid=instant_html%21nabble%3Aemail.namlbase=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespacebreadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml





--
View this message in context: 
http://forum.world.st/Mongo-cache-vs-database-objects-tp4725554p4725585.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.

Re: [Pharo-users] Mongo cache vs database objects

2013-11-27 Thread Sabine Knöfel
Hi Norbert,

ooh sorry, it was absolutely NOT  my intention to critisize your
explanation I wanted to say it is  complicated for my small brain ;-) I am
very happy about your quick answer which helped me finding a solution for
my problem!!! sorry!

This was the post FROM Johan about the documentation:
http://forum.world.st/Cleaning-up-Voyage-Documentation-td4723834.html

LOL now, after writing the answer I understand the joke ;-) (of Johan, from
johan)

Sabine





On Wed, Nov 27, 2013 at 2:17 PM, Norbert Hartl [via Smalltalk] 
ml-node+s1294792n4725590...@n4.nabble.com wrote:


 Am 27.11.2013 um 14:05 schrieb Sabine Knöfel [hidden 
 email]http://user/SendEmail.jtp?type=nodenode=4725590i=0
 :

 Hi Norbert,

 thank you very much for the clarification.

 I had to read it several times  but now I understand and I know what to
 change in my model for this (something with references to objects which
 have been deleted by the user).

 Yep, it _is_ a horrible explanation but the only one I can come up in a
 short timeframe :) Making it easily readably and clear would talk some more
 time.

 Perhaps your answer is also interesting for the documentation of Johan.

 Uh? I’ve never seen a documentation about Johan. That is a nice idea! I
 was always thinking about how to use him!

 Norbert

 Greets
 Sabine


 On Wed, Nov 27, 2013 at 1:44 PM, Norbert Hartl [via Smalltalk] a
 href=x-msg://256/user/SendEmail.jtp?type=nodeamp;node=4725585amp;i=0
 target=_top rel=nofollow link=external[hidden email] wrote:


 Am 27.11.2013 um 13:20 schrieb Sabine Knöfel [hidden 
 email]http://user/SendEmail.jtp?type=nodenode=4725577i=0
 :

  Hi Esteban, all,
 
  I work with mongo daily an it works fine, I am very happy with it.
 
  As you told me, with
  VORepository current reset.
  I can force re loading all objects from database and resetting the cache

  completely.
  This is helpful for development eg. after changing the magritte
  descriptions.
 
 Indeed. You need to flush/reset the repository in order to have new
 descriptions to take effect.

  My question:
  Is there a possibility to make a query and tell voyage that THIS query
  should be done within the database and NOT within the cached objets? And

  that all objects and the child objects from this query are loaded
 freshly
  from database into the cache.
 
 All queries go to the database. The cache is just used at resolve time.
 And it is necessary to have identical objects. Meaning you query the
 database directly and then objects are materialized. If the object is
 already in the cache the cached one is returned. Otherwise you would lose
 identity because having two requests containing the same object as a result
 would lead to two objects instead of one. You could only load trees instead
 of a graph.

  My concrete situation:
  I want that if the user logs in, his objects are loaded from database
 and
  NOT from cache. This means the person, his trips etc.
 
  And the question coming along with this:
  How long does the cache keeps objects/when are they reseted (except the

  VORepository current reset)?
  If I would never take a new image and never make a reset, would all
 objects
  remain in the image (and the database objects wold never be read)? In
 this
  case what about the size of the image?
 
 I’m not sure on this one. I think the cache does not clean anything. The
 thing about being able to load a graph I wrote above has also the
 constraint that all loaded objects that are still participating in the
 active graph need to be in the cache. But then the cache is a weak
 dictionary meaning that all objects leaving the active graph are removed
 from the cache (well at GC time, I think)
 Norbert

  Regards
  Sabine
 
 
 
  --
  View this message in context:
 http://forum.world.st/Mongo-cache-vs-database-objects-tp4725554.html
  Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.

 




 --
 If you reply to this email, your message will be added to the discussion
 below:

 http://forum.world.st/Mongo-cache-vs-database-objects-tp4725554p4725577.html
 To start a new topic under Pharo Smalltalk Users, email a
 href=x-msg://256/user/SendEmail.jtp?type=nodeamp;node=4725585amp;i=1
 target=_top rel=nofollow link=external[hidden email]
 To unsubscribe from Mongo cache vs database objects, click here.
 NAMLhttp://forum.world.st/template/NamlServlet.jtp?macro=macro_viewerid=instant_html%21nabble%3Aemail.namlbase=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespacebreadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml



 --
 View this message in context: Re: Mongo cache vs database 
 objectshttp://forum.world.st/Mongo-cache-vs-database-objects-tp4725554p4725585.html

 Sent from the Pharo Smalltalk Users mailing list 
 archivehttp://forum.world.st/Pharo-Smalltalk

Re: [Pharo-users] Mongo cache vs database objects

2013-11-27 Thread Sabine Knöfel
ok:-)

btw and ot:
http://adam-fletcher.co.uk/howtobegerman/
recommend!


On Wed, Nov 27, 2013 at 2:49 PM, Norbert Hartl [via Smalltalk] 
ml-node+s1294792n4725604...@n4.nabble.com wrote:


 Am 27.11.2013 um 14:28 schrieb Sabine Knöfel [hidden 
 email]http://user/SendEmail.jtp?type=nodenode=4725604i=0
 :

  Hi Norbert,

 ooh sorry, it was absolutely NOT  my intention to critisize your
 explanation I wanted to say it is  complicated for my small brain ;-) I am
 very happy about your quick answer which helped me finding a solution for
 my problem!!! sorry!

 No pun taken. In fact _I_ was criticizing my explanation because it sucks
 :) So now let’s stop it because we are germans not canadians. No more
 sorrys needed.

 This was the post FROM Johan about the documentation:
 http://forum.world.st/Cleaning-up-Voyage-Documentation-td4723834.html

 LOL now, after writing the answer I understand the joke ;-) (of Johan,
 from johan)

 Ah, the other Johan! It is good to know because I did some changes to
 MongoTalk so I see what I can add.

 Norbert

 Sabine





 On Wed, Nov 27, 2013 at 2:17 PM, Norbert Hartl [via Smalltalk] a
 href=x-msg://257/user/SendEmail.jtp?type=nodeamp;node=4725597amp;i=0
 target=_top rel=nofollow link=external[hidden email] wrote:


 Am 27.11.2013 um 14:05 schrieb Sabine Knöfel [hidden 
 email]http://user/SendEmail.jtp?type=nodenode=4725590i=0
 :

 Hi Norbert,

 thank you very much for the clarification.

 I had to read it several times  but now I understand and I know what to
 change in my model for this (something with references to objects which
 have been deleted by the user).

 Yep, it _is_ a horrible explanation but the only one I can come up in a
 short timeframe :) Making it easily readably and clear would talk some more
 time.

  Perhaps your answer is also interesting for the documentation of Johan.

 Uh? I’ve never seen a documentation about Johan. That is a nice idea! I
 was always thinking about how to use him!

 Norbert

 Greets
 Sabine


 On Wed, Nov 27, 2013 at 1:44 PM, Norbert Hartl [via Smalltalk] a
 href=a
 href=x-msg://256/user/SendEmail.jtp?type=nodeamp;amp;node=4725585amp;amp;i=0x-msg://256/user/SendEmail.jtp?type=nodeamp;node=4725585amp;i=0
 target=_top rel=nofollow link=external[hidden email] wrote:


 Am 27.11.2013 um 13:20 schrieb Sabine Knöfel [hidden 
 email]http://user/SendEmail.jtp?type=nodenode=4725577i=0
 :

  Hi Esteban, all,
 
  I work with mongo daily an it works fine, I am very happy with it.
 
  As you told me, with
  VORepository current reset.
  I can force re loading all objects from database and resetting the
 cache
  completely.
  This is helpful for development eg. after changing the magritte
  descriptions.
 
 Indeed. You need to flush/reset the repository in order to have new
 descriptions to take effect.

  My question:
  Is there a possibility to make a query and tell voyage that THIS query

  should be done within the database and NOT within the cached objets?
 And
  that all objects and the child objects from this query are loaded
 freshly
  from database into the cache.
 
 All queries go to the database. The cache is just used at resolve time.
 And it is necessary to have identical objects. Meaning you query the
 database directly and then objects are materialized. If the object is
 already in the cache the cached one is returned. Otherwise you would lose
 identity because having two requests containing the same object as a result
 would lead to two objects instead of one. You could only load trees instead
 of a graph.

  My concrete situation:
  I want that if the user logs in, his objects are loaded from database
 and
  NOT from cache. This means the person, his trips etc.
 
  And the question coming along with this:
  How long does the cache keeps objects/when are they reseted (except the

  VORepository current reset)?
  If I would never take a new image and never make a reset, would all
 objects
  remain in the image (and the database objects wold never be read)? In
 this
  case what about the size of the image?
 
 I’m not sure on this one. I think the cache does not clean anything. The
 thing about being able to load a graph I wrote above has also the
 constraint that all loaded objects that are still participating in the
 active graph need to be in the cache. But then the cache is a weak
 dictionary meaning that all objects leaving the active graph are removed
 from the cache (well at GC time, I think)
 Norbert

  Regards
  Sabine
 
 
 
  --
  View this message in context:
 http://forum.world.st/Mongo-cache-vs-database-objects-tp4725554.html
  Sent from the Pharo Smalltalk Users mailing list archive at 
  Nabble.comhttp://nabble.com/
 .
 




 --
 If you reply to this email, your message will be added to the discussion
 below:

 http://forum.world.st/Mongo-cache-vs-database-objects-tp4725554p4725577.html
  To start a new topic under Pharo Smalltalk Users, email a href=a
 href=x-msg://256/user/SendEmail.jtp

Re: [Pharo-users] Cleaning up Voyage Documentation

2013-11-22 Thread Sabine Knöfel
Hi Johann,

thanks. I have a working solution for migration and possibly one day I will
ask in the mailinglist for a diskussion about this.

Regards
Sabine


On Thu, Nov 21, 2013 at 4:09 PM, Johan Fabry [via Smalltalk] 
ml-node+s1294792n4723998...@n4.nabble.com wrote:

 Hi Sabine,

 thank you for your observations, interesting pointers and offer for help!
 I will integrate as much as possible and your comments are certainly
 welcome!

 I am not so knowledgeable about data migration, I understand what you are
 saying but I have no deep insights. I will add something about data
 migration to the documentation but I think it will be brief.

 Greetings,

 On Nov 21, 2013, at 6:16 AM, Sabine Knöfel [hidden 
 email]http://user/SendEmail.jtp?type=nodenode=4723998i=0
 wrote:

  Hi Johan,
 
  I use MongoDB and voyage for www.spesenfuchs.de and it works fine for
 me.
 
  My remarks:
 
  1) you could also add VOMongoTransientDescription (see class comment)
 and VOMongoToManyDescription to chapter enhancing storage.
 
  2) VORepository current reset is imo important to know. As far as I
 understand, it forces to reload all objects from database. I need this
 after changing the VOMongoDescriptions.
 
  3) I like the possibility to have a look into the values in the
 database. For this, there are 2 very useful tools: http://rockmongo.com/ for
 windows and http://robomongo.org/ for mac. I recommend to use it. Helps a
 lot.
 
  4) I think as far as you  start to implement a real app, you need this
 solution  to implement circular references
 http://forum.world.st/Voyage-Circular-references-td4691940.html#a4703493
 
  5) another not so important point
 
 http://forum.world.st/your-opinion-about-storing-FixedDecimal-in-Mongo-td4704104.html#a4704127
 
  6) I think you do also know:
  http://esug.org/data/ESUG2013/4-Thu/03-ESUG2013%20-%20VoyageTutorial.pdf
  http://smallworks.com.ar/web/blog
 
  7) Last point, you could add some words/thoughts about data migration:
 what do I mean with this? Today, my model is as it is. My app runs. Data is
 generated in MongoDB. But after e.g. one month, I decide to change my
 model. Now, there are 2 possibilities: migrate all data while installing
 the new version or some kind of lazy migration at the moment, the object
 is loaded from mongo (I do this within the magritte description). Both has
 advantages and disadvantages and depends on the situation. I am interested
 in other opinions and solutions for this.
 
  If I can contribute more please tell me.
 
  Regards
  Sabine
 

 --- Save our in-boxes! http://emailcharter.org ---

 Johan Fabry   -   http://pleiad.cl/~jfabry
 PLEIAD lab  -  Computer Science Department (DCC)  -  University of Chile




 --
  If you reply to this email, your message will be added to the discussion
 below:

 http://forum.world.st/Cleaning-up-Voyage-Documentation-tp4723834p4723998.html
  To start a new topic under Pharo Smalltalk Users, email
 ml-node+s1294792n1310670...@n4.nabble.com
 To unsubscribe from Pharo Smalltalk Users, click 
 herehttp://forum.world.st/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=1310670code=c2FiaW5lLmtub2VmZWxAZ21haWwuY29tfDEzMTA2NzB8MTA0OTM5MTYx
 .
 NAMLhttp://forum.world.st/template/NamlServlet.jtp?macro=macro_viewerid=instant_html%21nabble%3Aemail.namlbase=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespacebreadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml





--
View this message in context: 
http://forum.world.st/Cleaning-up-Voyage-Documentation-tp4723834p4724292.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.

Re: [Pharo-users] Cleaning up Voyage Documentation

2013-11-21 Thread Sabine Knöfel
Hi Johan,

I use MongoDB and voyage for www.spesenfuchs.de and it works fine for me.

My remarks:

1) you could also add VOMongoTransientDescription (see class comment)
and VOMongoToManyDescription to chapter enhancing storage.

2) VORepository current reset is imo important to know. As far as I
understand, it forces to reload all objects from database. I need this
after changing the VOMongoDescriptions.

3) I like the possibility to have a look into the values in the database.
For this, there are 2 very useful tools: http://rockmongo.com/ for windows
and http://robomongo.org/ for mac. I recommend to use it. Helps a lot.

4) I think as far as you  start to implement a real app, you need this
solution  to implement circular references
http://forum.world.st/Voyage-Circular-references-td4691940.html#a4703493

5) another not so important point
http://forum.world.st/your-opinion-about-storing-FixedDecimal-in-Mongo-td4704104.html#a4704127

6) I think you do also know:
http://esug.org/data/ESUG2013/4-Thu/03-ESUG2013%20-%20VoyageTutorial.pdf
http://smallworks.com.ar/web/blog

7) Last point, you could add some words/thoughts about data migration: what
do I mean with this? Today, my model is as it is. My app runs. Data is
generated in MongoDB. But after e.g. one month, I decide to change my
model. Now, there are 2 possibilities: migrate all data while installing
the new version or some kind of lazy migration at the moment, the object
is loaded from mongo (I do this within the magritte description). Both has
advantages and disadvantages and depends on the situation. I am interested
in other opinions and solutions for this.

If I can contribute more please tell me.

Regards
Sabine



On Wed, Nov 20, 2013 at 9:10 PM, Johan Fabry [via Smalltalk] 
ml-node+s1294792n4723834...@n4.nabble.com wrote:

 Hi all,

 I am building a small app that uses Voyage and MongoDB as the database,
 and so I had many questions regarding how to use it and found the
 documentation lacking. After conversing with Esteban, I proposed that I
 improve the 'Pharo for the enterprise' chapter on Voyage, based on his
 responses to my questions. (See
 https://ci.inria.fr/pharo-contribution/job/PharoForTheEnterprise/lastSuccessfulBuild/artifact/Voyage/Voyage.pier.html
  and

 https://github.com/SquareBracketAssociates/PharoForTheEnterprise-english/tree/master/Voyage
  for
 the sources)

 So a heads-up: I would like to take a 'lock' on that text for some days
 (to avoid conflicts and the associated unpleasantness), as I go improving
 and expanding it in the next few days.

 Also, if you have questions and/or remarks about Voyage and/or the
 documentation, shoot! I will do my best to address them.

 Greetings,

 --- Save our in-boxes! http://emailcharter.org ---

 Johan Fabry   -   http://pleiad.cl/~jfabry
 PLEIAD lab  -  Computer Science Department (DCC)  -  University of Chile




 --
  If you reply to this email, your message will be added to the discussion
 below:
 http://forum.world.st/Cleaning-up-Voyage-Documentation-tp4723834.html
  To start a new topic under Pharo Smalltalk Users, email
 ml-node+s1294792n1310670...@n4.nabble.com
 To unsubscribe from Pharo Smalltalk Users, click 
 herehttp://forum.world.st/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=1310670code=c2FiaW5lLmtub2VmZWxAZ21haWwuY29tfDEzMTA2NzB8MTA0OTM5MTYx
 .
 NAMLhttp://forum.world.st/template/NamlServlet.jtp?macro=macro_viewerid=instant_html%21nabble%3Aemail.namlbase=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespacebreadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml





--
View this message in context: 
http://forum.world.st/Cleaning-up-Voyage-Documentation-tp4723834p4723922.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.

Re: [Pharo-users] Voyage: image freeze/VOMongoError: Lazy reference not found

2013-08-31 Thread Sabine Knöfel
Hi Esteban,

til now, it did not come back to me.
Can you reproduce it with a fresh image?
Btw I am saving my image now each hour or so...

Sabine


On Sat, Aug 31, 2013 at 5:46 PM, Esteban A. Maringolo [via Smalltalk] 
ml-node+s1294792n4705953...@n4.nabble.com wrote:

 I've been bitten by this too.
 This is when the image concept get counterproductive if you didn't
 commit all your code changes. :-/

 Esteban A. Maringolo



 --
  If you reply to this email, your message will be added to the discussion
 below:

 http://forum.world.st/Voyage-image-freeze-VOMongoError-Lazy-reference-not-found-tp4703739p4705953.html
  To unsubscribe from Voyage: image freeze/VOMongoError: Lazy reference not
 found, click 
 herehttp://forum.world.st/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=4703739code=c2FiaW5lLmtub2VmZWxAZ21haWwuY29tfDQ3MDM3Mzl8MTA0OTM5MTYx
 .
 NAMLhttp://forum.world.st/template/NamlServlet.jtp?macro=macro_viewerid=instant_html%21nabble%3Aemail.namlbase=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespacebreadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml





--
View this message in context: 
http://forum.world.st/Voyage-image-freeze-VOMongoError-Lazy-reference-not-found-tp4703739p4705960.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.

Re: [Pharo-users] voyage/mongo randomly wrong OIDs

2013-08-30 Thread Sabine Knöfel
Sorry for the discussion

for me, this discussion is interesting and important because I need a
solution. :-)
Thank you for the discussion!

I tried following ideas but they have been up to 4 times slower than the
original:
1) I tried to remember the last seed in an inst var of UUIDGenerator and
create it new if it was the same as the last one.
2) wait for 1 millisecond before create new seed.

As third, I tried adding a (random nextInt: 10). This did not work,
there have been also doouble numbers.

So, perhaps the counter is a good idea but is it fast?

Again, I work on windows and so I get nil as answer to makeUnixSeed.

makeSeed

| seed |
 seed := self makeUnixSeed.
seed ifNotNil: [^seed].

[seed := (Time millisecondClockValue bitAnd: 16r3FFF) bitXor: self hash.
 seed := seed bitXor: (Time totalSeconds bitAnd: 16r3FFF).
seed = 0] whileTrue: [Try again if ever get a seed = 0].

^seed


On Fri, Aug 30, 2013 at 5:15 PM, Sven Van Caekenberghe-2 [via Smalltalk] 
ml-node+s1294792n4705817...@n4.nabble.com wrote:


 On 30 Aug 2013, at 16:54, Esteban Lorenzano [hidden 
 email]http://user/SendEmail.jtp?type=nodenode=4705817i=0
 wrote:

 
  On Aug 30, 2013, at 4:49 PM, Sven Van Caekenberghe [hidden 
  email]http://user/SendEmail.jtp?type=nodenode=4705817i=1
 wrote:
 
 
  On 30 Aug 2013, at 16:35, Esteban Lorenzano [hidden 
  email]http://user/SendEmail.jtp?type=nodenode=4705817i=2
 wrote:
 
 
  On Aug 29, 2013, at 5:08 PM, Sven Van Caekenberghe [hidden 
  email]http://user/SendEmail.jtp?type=nodenode=4705817i=3
 wrote:
 
 
  On 29 Aug 2013, at 16:51, Esteban Lorenzano [hidden 
  email]http://user/SendEmail.jtp?type=nodenode=4705817i=4
 wrote:
 
  hi
 
  well... I've never been happy on using the UUID generator for my
 keys, but is the fastest option I found.
  There are, of course, alternatives:
 
  1) Using your own number generator (sequential, or whatever).
 Problem with that is that is image based, then you need a persistence
 strategy... then you are slow.
  2) then you can use your own procedure in mongo... with same problem
 than (1)
  3) you could use timestamp. but TimeStamps are slow :(
 
  anyway... I open to ideas :)
 
  in the mean time, you can check if your UUID generator is using the
 primitive or not. In you are not, you have more possibilities of having a
 collision.
 
  Yes, the Smalltalk code (type 4 UUID) is just a random number that is
 computed in a complex way.
 
  What does the primitive actually do ? Is it different ?
 
  the primitive uses the clock ticks to produce an UUID... you shouldn't
 have repeated numbers that way... but well, it depends on the platform
 implementation also.
 
  I don't like plugins because it is some much harder for everyone to
 look at the implementation, while everybody thinks some magic happens
 there, and often the truth is quite disappointing.
 
  Maybe the resolution of #primUTCMicrosecondsClock is not high enough ?
 
  I tried... not enough :(

 I understand: the clock is not fast enough for the request rate. But then
 what is there against some counter as part of a UUID ?

 Sorry for the discussion, I find it an interesting subject. I'll have to
 read a bit about UUIDs. Can anyone point to the plugin implementation code
 ?

  Esteban
 
  On Aug 29, 2013, at 11:27 AM, Sabine Knöfel [hidden 
  email]http://user/SendEmail.jtp?type=nodenode=4705817i=5
 wrote:
 
  Hi Esteban, All,
 
  I was proceeding to seach for the reason of the problem I described
  yesterday.
 
  I added some debugging code into
 VOMongoSerializerensurePersisted: and the
  problem I described, did NOT occur.
 
  That made the whole process slower...and I had an idea
 
  I was looking into UUIDGenerator default makeSeed.
  Then I tried the following code:
 
  |theOld theNew|
 
  1 timesRepeat: [
  theNew :=  UUIDGenerator default makeSeed.
  theNew = theOld ifTrue: [self halt].
  theOld := theNew]
 
  The debugger came up! Doesn't that mean that, if the code is run
 very fast,
  there are double OIDs generated?!
 
  In my case, the objects for country and currency are very
 lightweight and
  so, they are created very fast. Also, the error occured much more
 often
  within my fast production EC2 instance as at my (old and slow)
 development
  pc.
 
  Important: I work with windows and so makeUnixSeed returns nil...
 :-)
 
  What is your opinion about that?
 
  Sabine
 
 
 
  --
  View this message in context:
 http://forum.world.st/voyage-mongo-randomly-wrong-OIDs-tp4705396p4705603.html
  Sent from the Pharo Smalltalk Users mailing list archive at
 Nabble.com.
 
 
 
 
 
 
 
 
 
 
 




 --
  If you reply to this email, your message will be added to the discussion
 below:

 http://forum.world.st/voyage-mongo-randomly-wrong-OIDs-tp4705396p4705817.html
  To unsubscribe from voyage/mongo randomly wrong OIDs, click 
 herehttp://forum.world.st/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=4705396code

[Pharo-users] voyage/mongo randomly wrong OIDs

2013-08-28 Thread Sabine Knöfel
Hi,

I have a strange problem and before searching for more hours, I want to ask,
if this problem is known.
If not, I will proceed by myself ;-)

Background:
I write currencies and countries into mongo with voyage.
For database creation, first I create all currencies and countries of the
world in the image.
One Country has N currencies and one Currency has N countries.
After creating the model objects in the image, I save them to mongo with
voyage then.

Problem:
Here something strange happens. SOMETIMES, the OID to the Currencies
collection is wrong! It is the OID of the object itself (the country).
Please see the example of UnitedArabEmirates below to understand what I
mean. The OID of the country UAE is the same as the pointer to the
currency(!). But in the model objects in my image, the inst var currencies
was NOT pointing to the country itself but to the currency.

{
   #version: NumberInt(466896549),
   _id: ObjectId(a5466c0b),
   countryName: labelCountryUnitedArabEmirates,
   currencies: {
 0: {
   #collection: Currencies,
   __id: ObjectId(a5466c0b) 
} 
  },
   iso3166: ARE 
}   
 

this is an example of a country which is correct.
 
{
   #version: NumberInt(228627064),
   _id: ObjectId(b7956c0b),
   countryName: labelCountryArgentina,
   currencies: {
 0: {
   #collection: Currencies,
   __id: ObjectId(77926c0b) 
} 
  },
   iso3166: ARG 
}   
 

The important point is: this happens randomly. I take the one fresh loaded
image, create the objects into the database and close the image without
saving. The next time, other countries are wrong. If I delete the wrong
objects from the database and re-create them, they are correct.

I was trying to save the objects with delays but this did noch change
anyting.

I want to find out, what the reason for that is and ask you if you had
similar problems or if this is a known bug

any hint appreciated.

Sabine
 




--
View this message in context: 
http://forum.world.st/voyage-mongo-randomly-wrong-OIDs-tp4705396.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.



[Pharo-users] your opinion about storing FixedDecimal in Mongo

2013-08-19 Thread Sabine Knöfel
Hi,

I am interested in your opinion.
I use FixedDecimal for computing currency amounts.
This works fine.

When storing the amounts with voyage into mongo (I have a lot of them!!!),
normally, one currency amount would be stored into mongo as follows:

   vatAmountEUR: {
 #instanceOf: FixedDecimal,
 negative: false,
 number: NumberInt(90280),
 part1: NumberInt(9),
 part2: NumberInt(280),
 scale: NumberInt(4) 
  } 

I think, this is a lot of stuff for one single value. I tend to convert the
FixedDecimal into a Float for storing it. In this case, it would be like
this:

 vatAmountEUR: 0.7196 

When loading, I immediately re-convert it into a FixedDecimal. I would do NO
computing with the float(!!).

What is your opinion about this (rounding issues, performance, database size
etc.)?
Do you think, there is something against it? What would you do?

Sabine







--
View this message in context: 
http://forum.world.st/your-opinion-about-storing-FixedDecimal-in-Mongo-tp4704104.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.



Re: [Pharo-users] your opinion about storing FixedDecimal in Mongo

2013-08-19 Thread Sabine Knöfel
Hi Henry, Esteban, Joachim,

thanks for your opinion!

The ranges of my data are relatively small because my application deals
with travel expenses, e.g. Hotel receipts, Taxi receipts, Flights et. So,
99,99% of all my amounts are less than 10.000 Euro.

So I will try it with the Float solution and use a scale of 4.

...and I will indeed add checking for range! Good point, I do not have this
yet.

Sabine



On Mon, Aug 19, 2013 at 12:48 PM, Henrik Sperre Johansen [via Smalltalk] 
ml-node+s1294792n4704124...@n4.nabble.com wrote:


 On Aug 19, 2013, at 10:38 , Sabine Knöfel [hidden 
 email]http://user/SendEmail.jtp?type=nodenode=4704124i=0
 wrote:

  Hi,
 
  I am interested in your opinion.
  I use FixedDecimal for computing currency amounts.
  This works fine.
 
  When storing the amounts with voyage into mongo (I have a lot of
 them!!!),
  normally, one currency amount would be stored into mongo as follows:
 
vatAmountEUR: {
  #instanceOf: FixedDecimal,
  negative: false,
  number: NumberInt(90280),
  part1: NumberInt(9),
  part2: NumberInt(280),
  scale: NumberInt(4)
   }
 
  I think, this is a lot of stuff for one single value. I tend to convert
 the
  FixedDecimal into a Float for storing it. In this case, it would be like
  this:
 
  vatAmountEUR: 0.7196
 
  When loading, I immediately re-convert it into a FixedDecimal. I would
 do NO
  computing with the float(!!).
 
  What is your opinion about this (rounding issues, performance, database
 size
  etc.)?
  Do you think, there is something against it? What would you do?
 
  Sabine
 There are rounding issues even without doing arithmetic, conversion scaled
 - float WILL inherently be lossy due to float's fixed size.
 You are only ensured 15 decimal digits of precision with 64-bit floating
 point numbers like in Pharo (BSON Doubles):
 98765432109.87658s5 asFloat asScaledDecimal: 5 98765432109.87659s5

 Though, Compared to using NumberInt ( a signed 32-bit integer, with max 9
 digits) for storing the unscaled number, it's actually the better option…

 I guess the morale is, either way, as long as you are storing values in
 fixed size data fields (and not say, a String), you need some checks in
 place to ensure the numbers you are saving are within valid ranges. ;)

 Cheers,
 Henry


 *signature.asc* (859 bytes) Download 
 Attachmenthttp://forum.world.st/attachment/4704124/0/signature.asc


 --
  If you reply to this email, your message will be added to the discussion
 below:

 http://forum.world.st/your-opinion-about-storing-FixedDecimal-in-Mongo-tp4704104p4704124.html
  To unsubscribe from your opinion about storing FixedDecimal in Mongo, click
 herehttp://forum.world.st/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=4704104code=c2FiaW5lLmtub2VmZWxAZ21haWwuY29tfDQ3MDQxMDR8MTA0OTM5MTYx
 .
 NAMLhttp://forum.world.st/template/NamlServlet.jtp?macro=macro_viewerid=instant_html%21nabble%3Aemail.namlbase=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespacebreadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml





--
View this message in context: 
http://forum.world.st/your-opinion-about-storing-FixedDecimal-in-Mongo-tp4704104p4704127.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.

[Pharo-users] Voyage: image freeze/VOMongoError: Lazy reference not found

2013-08-15 Thread Sabine Knöfel
Hi Esteban,

sorry but I need your help again.

I succeeded in re-writing all my code to use voyage and can save all my
model now. Great!

Now I was experimenting with it and I have an Image freeze which should not
occur in production;-).

Situation:

I created one Person with two trips. Trip points back to its person.
After writing it into mongo, I delete one trip from mongo manually (I use
rockmongo, great tool).

So in the database, I have now
1) one Person which points to two trips
2) one trip (the other was deleted)

Now, I do:
Person selectAll first trips

and the image freezes.

Sometimes, I find in the DebugLog: 
VOMongoError: Lazy reference not found RKATrip: OID(103475906)

This is correct ;-)

I did also try with enableMissingContent but did not work.
http://forum.world.st/Voyage-GC-collecting-random-objects-td4668438.html

Sure, normally, we do not manipulate the database manually.
But I want to be sure that the image does not freeze if this occurs

How can I solve this?

regards 
Sabine



###
with this filein you can reproduce it easily
###
Object subclass: #Person
instanceVariableNames: 'trips lastName'
classVariableNames: ''
poolDictionaries: ''
category: 'RKA24-Demo'!

!Person methodsFor: 'accessing' stamp: 'sabineknoefel 8/15/2013 10:02'!
lastName

^ lastName! !

!Person methodsFor: 'accessing' stamp: 'sabineknoefel 8/15/2013 10:02'!
lastName: anObject

lastName := anObject! !

!Person methodsFor: 'accessing' stamp: 'sabineknoefel 8/15/2013 10:02'!
trips

^ trips! !

!Person methodsFor: 'accessing' stamp: 'sabineknoefel 8/15/2013 10:02'!
trips: anObject

trips := anObject! !

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- !

Person class
instanceVariableNames: ''!

!Person class methodsFor: 'as yet unclassified' stamp: 'sabineknoefel
8/15/2013 10:06'!
isVoyageRoot 
^true! !

!Person class methodsFor: 'as yet unclassified' stamp: 'sabineknoefel
8/15/2013 11:48'!
mongoContainer 
mongoContainer

^VOMongoContainer new 
collectionName: 'testPersons';
enableMissingContent;
kind: Person;
yourself! !

!Person class methodsFor: 'as yet unclassified' stamp: 'sabineknoefel
8/15/2013 10:13'!
mongoTrips
mongoDescription

^ VOMongoToManyDescription new
attributeName: 'trips';
kind: Trip;
yourself! !


Object subclass: #Trip
instanceVariableNames: 'description person'
classVariableNames: ''
poolDictionaries: ''
category: 'RKA24-Demo'!

!Trip methodsFor: 'accessing' stamp: 'sabineknoefel 8/15/2013 10:04'!
description

^ description! !

!Trip methodsFor: 'accessing' stamp: 'sabineknoefel 8/12/2013 10:12'!
description: anObject

description := anObject! !

!Trip methodsFor: 'accessing' stamp: 'sabineknoefel 8/15/2013 10:04'!
person

^ person! !

!Trip methodsFor: 'accessing' stamp: 'sabineknoefel 8/15/2013 10:04'!
person: anObject

person := anObject! !

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- !

Trip class
instanceVariableNames: ''!

!Trip class methodsFor: 'as yet unclassified' stamp: 'sabineknoefel
8/12/2013 09:47'!
isVoyageRoot 
^true! !

!Trip class methodsFor: 'as yet unclassified' stamp: 'sabineknoefel
8/15/2013 11:48'!
mongoContainer 
mongoContainer

^VOMongoContainer new 
collectionName: 'testTrips';
enableMissingContent;
kind: Trip;
yourself! !

!Trip class methodsFor: 'as yet unclassified' stamp: 'sabineknoefel
8/15/2013 10:12'!
mongoPerson
VOMongoRepository allInstancesDo: #reset. 

mongoDescription

^ VOMongoToOneDescription new
attributeName: 'person';
kind:  Person;
yourself ! !

!Trip class methodsFor: 'as yet unclassified' stamp: 'sabineknoefel
8/15/2013 11:50'!
testOnePersonTwoTrips
| theTrip the2ndTrip thePerson |
thePerson := Person new lastName: 'Knoefel'.
theTrip := Trip new description: 'Trip to Munic'.
the2ndTrip := Trip new description: 'Trip to Essen'.
theTrip person: thePerson.
the2ndTrip person: thePerson.
thePerson trips: (OrderedCollection with: theTrip with: the2ndTrip ).
theTrip save.

VOMongoRepository allInstancesDo: #reset. 

now I delete one trip from mongo

Person selectAll first trips! !




--
View this message in context: 
http://forum.world.st/Voyage-image-freeze-VOMongoError-Lazy-reference-not-found-tp4703739.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.



Re: [Pharo-users] Voyage: Circular references

2013-08-13 Thread Sabine Knöfel
Hi Esteban,

thanks, this works fine now!

You also answered my next question how to define an attribute as transient
- with VOMongoTransientDescription :)

Your blog posts 
http://smallworks.com.ar/web/blog?_k=c9RiCz1d5w-0XSbp
are very helpful to start.

Do you have more information/documentation for voyage?

Regards
Sabine





--
View this message in context: 
http://forum.world.st/Voyage-Circular-references-tp4691940p4703493.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.



Re: [Pharo-users] Voyage: Circular references

2013-08-12 Thread Sabine Knöfel
Hi Esteban,

thank you for the solution with the VOMongoToOneDescription.
This works perfect for me.

I have to come back to the circular references.
I am not sure if this is a bug.

I have the following model:

Trip - Day - VehicleTrip

One Trip has N Days.
One Day has N VehicleTrips.
The VehicleTrip points back to its Day.
The Trip is voyageRoot.

But I dont want Day or VehicleTrip to be voyageRoot, too.
(In my opinion this does not make sense).

If I try to save the trip, I get the endless loop.
Attention, the Image freezes then. :-)

How would you solve this? Also with the VOMongoToOneDescription solution?
You can reproduce it with the fileout below.

Regards
Sabine

This is the fileout:

Object subclass: #Day
instanceVariableNames: 'date vehicleTrips'
classVariableNames: ''
poolDictionaries: ''
category: 'RKA24-Demo'!

!Day methodsFor: 'accessing' stamp: 'sabineknoefel 8/12/2013 11:13'!
date: anObject

date := anObject! !

!Day methodsFor: 'accessing' stamp: 'sabineknoefel 8/12/2013 11:15'!
vehicleTrips: anObject

vehicleTrips := anObject! !


Object subclass: #VehicleTrip
instanceVariableNames: 'day description'
classVariableNames: ''
poolDictionaries: ''
category: 'RKA24-Demo'!

!VehicleTrip methodsFor: 'accessing' stamp: 'sabineknoefel 8/12/2013 11:13'!
day: anObject

day := anObject! !

!VehicleTrip methodsFor: 'accessing' stamp: 'sabineknoefel 8/12/2013 11:14'!
description: anObject

description := anObject! !


Object subclass: #Trip
instanceVariableNames: 'days description'
classVariableNames: ''
poolDictionaries: ''
category: 'RKA24-Demo'!

!Trip methodsFor: 'accessing' stamp: 'sabineknoefel 8/12/2013 11:14'!
days: anObject

days := anObject! !

!Trip methodsFor: 'accessing' stamp: 'sabineknoefel 8/12/2013 10:12'!
description: anObject

description := anObject! !

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- !

Trip class
instanceVariableNames: ''!

!Trip class methodsFor: 'as yet unclassified' stamp: 'sabineknoefel
8/12/2013 11:15'!
demo
|theTrip theDay theVehicleTrip|
theTrip := Trip new description: 'Trip to Munic'.
theDay := Day new date: Date today.
theVehicleTrip := VehicleTrip new description: 'with car to fair'.
theVehicleTrip day: theDay.
theTrip days: (OrderedCollection with: theDay).
theDay vehicleTrips: (OrderedCollection with: theVehicleTrip ).
 
theTrip halt save ! !

!Trip class methodsFor: 'as yet unclassified' stamp: 'sabineknoefel
8/12/2013 09:47'!
isVoyageRoot 
^true! !

 



|theTrip theDay theVehicleTrip|
theTrip := Trip new description: 'Trip to Munic'.
theDay := Day new date: Date today.
theVehicleTrip := VehicleTrip new description: 'with car to fair'.
theVehicleTrip day: theDay.
theTrip days: (OrderedCollection with: theDay).
theDay vehicleTrips: (OrderedCollection with: theVehicleTrip ).
 
theTrip inspect 



--
View this message in context: 
http://forum.world.st/Voyage-Circular-references-tp4691940p4703303.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.



Re: [Pharo-users] Bug in DatereadFrom:pattern: ? Pharo2.0

2013-07-24 Thread Sabine Knöfel
Hi,

I created a bug, hoping that I filled out every field correctly.

https://pharo.fogbugz.com/f/cases/11222/Date-readFrom-pattern-year-2-decimals-not-20xx-but-00xx

Sabine

On Wed, Jul 24, 2013 at 9:52 AM, Stéphane Ducasse [via Smalltalk]
ml-node+s1294792n4700428...@n4.nabble.com wrote:
 Hello Sabine
 probably a bug.
 If you can write some tests and publish them on the bugtracker this will
 help.
 If you provide the fix (it will be faster to get it fixed) please run the
 tests to make sure that we do not
 introduce side effects.

 Stef

 Hi,

 Date readFrom: '4.2.13' readStream pattern: 'd.m.yy'

 Does not return 4.2.2013 but 4.2.0013

 The comment is saying
 A year given using only two decimals is considered to be 2000

 So, the comment is not ok or this is a bug?

 Sabine



 --
 View this message in context:
 http://forum.world.st/Bug-in-Date-readFrom-pattern-Pharo2-0-tp4700427.html
 Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.





 
 If you reply to this email, your message will be added to the discussion
 below:
 http://forum.world.st/Bug-in-Date-readFrom-pattern-Pharo2-0-tp4700427p4700428.html
 To unsubscribe from Bug in DatereadFrom:pattern: ? Pharo2.0, click here.
 NAML




--
View this message in context: 
http://forum.world.st/Bug-in-Date-readFrom-pattern-Pharo2-0-tp4700427p4700443.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.

Re: [Pharo-users] Voyage: Circular references

2013-07-22 Thread Sabine Knöfel
:-) For me it would be very useful ;-)
But a hint here in the forum would be enough for the moment to proceed.
Sabine



--
View this message in context: 
http://forum.world.st/Voyage-Circular-references-tp4691940p4699971.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.



Re: [Pharo-users] Voyage: Circular references

2013-07-19 Thread Sabine Knöfel
Hi Esteban,

yes, now the Rectangle Example works after doing the reset.

But saving my model still leads to a non responding image because
Voyage is trying to write json for all model stuf deep deep deep and
circular. Perhaps same like:
http://forum.world.st/Voyage-Circular-references-td4691940.html#a4699436

I dont know anything about Magritte (yet) and I need a hint what to
define in my model so that it stops creating json at certain points
and creates only e.g. a Symbol.

Example: My model instance  of trip has a connection to an instance of
country. The country should not be written in json with all its
definitions. Voyage should only write e.g. #germany in the json and
later, when getting the instance back from the database, I want to
reassign the trip to the country.

I already implemented this stuff when working witk Mongotalk the last
months and it worked fine. But my question yesterday:
http://forum.world.st/MongoDB-open-close-in-production-singleton-or-not-td4699322.html
lead to my impression that I should use voyage.

So, how can I define the borders?

Sabine

On Thu, Jul 18, 2013 at 7:45 PM, EstebanLM [via Smalltalk]
ml-node+s1294792n4699443...@n4.nabble.com wrote:
 Hi Sabine,

 Probably you do not missed anything.
 Probably I missed to update the voyage configuration :)

 can you try doing

 VOMongoRepository allInstancesDo: #reset.

 before trying again?

 Cheers,
 Esteban

 On Jul 18, 2013, at 6:31 PM, Sabine Knöfel [hidden email] wrote:

 I found this:
 http://smallworks.eu/web/blog/2013-06-14-voyage-the-adventure

 Chapter Enhancing storage
 But if I add the 3+1 methods to Rectangle, and save it again, the json did
 not change.

 Did I miss something?




 --
 View this message in context:
 http://forum.world.st/Voyage-Circular-references-tp4691940p4699436.html
 Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.





 
 If you reply to this email, your message will be added to the discussion
 below:
 http://forum.world.st/Voyage-Circular-references-tp4691940p4699443.html
 To unsubscribe from Voyage: Circular references, click here.
 NAML




--
View this message in context: 
http://forum.world.st/Voyage-Circular-references-tp4691940p4699491.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.

Re: [Pharo-users] Voyage: Circular references

2013-07-19 Thread Sabine Knöfel
Hi Esteban,

thanks!

I think the solution of Bernat will not be enough for me.
I added the class methods isVoyageRoot to the root objects (like trip,
country and so on).

But I have instances which should never be persistent, e.g. the
country I mentioned. The Country has currencies and expense rates and
this is a lot of stuff...this should be only transient in the image.

The transient country is referenced by persistent instances of trip.
(countrie does naturally not point to trips)

Trip (persistant) - Country (transient)

If I try to save a trip, voyage at some point enters
rawReference: description:
and there, it looks whether anObject (a country) isNew:
isNew means the other object, the country has an _id (mongo id).

The country does not have an id and for this reason, voyage tries to
make it persistent although its class has isVogageRoot false.
And than the system enters a point where it tries to make so many
objects persistent that the image does not respond anymore.

So, my question is: is it possible to define
In class trip, there is an inst var country - voyage please save
only a symbol here
and
voyage, if loading a trip, for inst var country, do shting

Sure, I could save symbols within the trips country inst var all the time
and get the country it if needed, but it would be nicer if voyage coud
do that for me .-)

Sabine





On Fri, Jul 19, 2013 at 11:52 AM, EstebanLM [via Smalltalk]
ml-node+s1294792n4699516...@n4.nabble.com wrote:
 Hi Sabine,

 If Bernat help is not enough, I would like to have some more insight on your
 problem, so If you can put here a better description of your model and the
 problem you are having, I will have a look :)

 Esteban

 On Jul 19, 2013, at 10:42 AM, Bernat Romagosa [hidden email] wrote:

 Hi Sabine!

 If you want an object to be referenced by another, and not embedded in it,
 you need to give that object root entity. As a root, the object will have a
 collection of its own, and will be referenced by other objects by id. If the
 object is not root, it will be embedded inside the referring object as a
 property.

 So, to be safe, always set #isVoyageRoot to return true at class side of all
 objects you don't want to have embedded. In general, big enough objects
 who are referenced by different objects should be root.

 In my case, I had a centre which had users which had centres. Users also had
 projects, and projects also had users. Big mess, I know. Besides that, all
 users, centres and projects had profiles. My solution was to make centres,
 projects and users be roots, and let only the profiles be embedded.

 I hope this helped!

 Bernat.


 2013/7/19 Sabine Knöfel [hidden email]

 Hi Esteban,

 yes, now the Rectangle Example works after doing the reset.

 But saving my model still leads to a non responding image because
 Voyage is trying to write json for all model stuf deep deep deep and
 circular. Perhaps same like:
 http://forum.world.st/Voyage-Circular-references-td4691940.html#a4699436

 I dont know anything about Magritte (yet) and I need a hint what to
 define in my model so that it stops creating json at certain points
 and creates only e.g. a Symbol.

 Example: My model instance  of trip has a connection to an instance of
 country. The country should not be written in json with all its
 definitions. Voyage should only write e.g. #germany in the json and
 later, when getting the instance back from the database, I want to
 reassign the trip to the country.

 I already implemented this stuff when working witk Mongotalk the last
 months and it worked fine. But my question yesterday:

 http://forum.world.st/MongoDB-open-close-in-production-singleton-or-not-td4699322.html
 lead to my impression that I should use voyage.

 So, how can I define the borders?

 Sabine

 On Thu, Jul 18, 2013 at 7:45 PM, EstebanLM [via Smalltalk]
 [hidden email] wrote:

  Hi Sabine,
 
  Probably you do not missed anything.
  Probably I missed to update the voyage configuration :)
 
  can you try doing
 
  VOMongoRepository allInstancesDo: #reset.
 
  before trying again?
 
  Cheers,
  Esteban
 
  On Jul 18, 2013, at 6:31 PM, Sabine Knöfel [hidden email] wrote:

 
  I found this:
  http://smallworks.eu/web/blog/2013-06-14-voyage-the-adventure
 
  Chapter Enhancing storage
  But if I add the 3+1 methods to Rectangle, and save it again, the json
  did
  not change.
 
  Did I miss something?
 
 
 
 
  --
  View this message in context:
  http://forum.world.st/Voyage-Circular-references-tp4691940p4699436.html
  Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
 
 
 
 
 
  
  If you reply to this email, your message will be added to the discussion
  below:
  http://forum.world.st/Voyage-Circular-references-tp4691940p4699443.html
  To unsubscribe from Voyage: Circular references, click here.
  NAML

 
 View this message in context: Re: Voyage: Circular references

 Sent from the Pharo Smalltalk

[Pharo-users] MongoDB open close in production (singleton or not)

2013-07-18 Thread Sabine Knöfel
Hi,

Currently, I create one single Instance of Mongo when starting the Image.

| theRoot  |
theRoot := Mongo default.
theRoot open.

and use it for all requests. In my development environment that works fine.

My question is: is this the right way and will it work for production?
Or is it better to create one Mongo instance for each request (and close it
after the request)?
And, btw: what would happen if I would open many Mongo connections but never
close any?
Or better one Instance per user session?

Sabine 

(I posted this in Frameworks forum, possibly better here)



--
View this message in context: 
http://forum.world.st/MongoDB-open-close-in-production-singleton-or-not-tp4699322.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.



Re: [Pharo-users] MongoDB open close in production (singleton or not)

2013-07-18 Thread Sabine Knöfel
Hi Norbert and Mariano,

thanks for the important input.
I will use voyage now, just loading :-)

BTW: it is really great, getting answers in the forum so quick and
profound!!! I am very happy about that.

Sabine

On Thu, Jul 18, 2013 at 2:57 PM, Norbert Hartl [via Smalltalk]
ml-node+s1294792n4699354...@n4.nabble.com wrote:

 Am 18.07.2013 um 12:33 schrieb Sabine Knöfel [hidden email]:

 Hi,

 Currently, I create one single Instance of Mongo when starting the Image.

 | theRoot  |
 theRoot := Mongo default.
 theRoot open.

 and use it for all requests. In my development environment that works
 fine.

 My question is: is this the right way and will it work for production?

 No, certainly not. If you restart mongo db e.g. due a system update the
 connection from the image would be stale serving you errors.
 Or is it better to create one Mongo instance for each request (and close
 it
 after the request)?
 That is theoretically the safest thing but very expensive. Opening a
 connection always takes time and consume quite some resources. So reuse is
 king.
 And, btw: what would happen if I would open many Mongo connections but
 never
 close any?
 You would run out of external semaphores in the image. The image is
 somewhat broken in this regard because it cannot expand the semaphore
 table. As each connection uses three semaphores you are running out of
 semaphores after 85 requests.

 Or better one Instance per user session?

 That can be a good idea but it doesn't solve your actual problem.

 You also need to take care of concurrent requests. The line protocol to the
 mongo database needs to be aligned and it is binary. If more threads try to
 write on the same connection the connection will break. I'm not sure if this
 is still possible in the newest MongoTalk driver nor do I know if I managed
 it to release my thread safe mongo instance.

 The pool Mariano is talking about sounds like a good idea. Otherwise wrap
 your store method with an exception handler to reopen a connection on
 failure.

 Norbert




 
 If you reply to this email, your message will be added to the discussion
 below:
 http://forum.world.st/MongoDB-open-close-in-production-singleton-or-not-tp4699322p4699354.html
 To unsubscribe from MongoDB open close in production (singleton or not),
 click here.
 NAML




--
View this message in context: 
http://forum.world.st/MongoDB-open-close-in-production-singleton-or-not-tp4699322p4699356.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.

[Pharo-users] Voyage: Circular references

2013-07-18 Thread Sabine Knöfel
Hi,

I was working for a while with Mongotalk and started with Voyage today.
I run in exactly the same problem as Bernat. Image non responding.

I tried the star/planet example and it worked. hmpf.

When I debugged into, I recognized that I did not tell Voyage at which
model bounds to stop when creating the json.

I have to explain this.

I have Persons and Trips. One person can have many trips, one trip belongs
to exactly one person.

But my trips also have e.g. associations to Countries. I do not want Voayge
to put the whole country instance in the json of the trip but only a key
(e.g. #germany) for getting the country instance back when loading the trip.
Currently, Voyage is trying to put all the stuff in the json, also
currencies etc. 

I am not sure if the image is hanging because of this reason.

So, my question is how to tell voyage which attributes NOT to put completely
into the json but only a key.

Sabine





--
View this message in context: 
http://forum.world.st/Voyage-Circular-references-tp4691940p4699412.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.



[Pharo-users] Voyage: Circular references

2013-07-18 Thread Sabine Knöfel
I found this:
http://smallworks.eu/web/blog/2013-06-14-voyage-the-adventure

Chapter Enhancing storage
But if I add the 3+1 methods to Rectangle, and save it again, the json did
not change.

Did I miss something?




--
View this message in context: 
http://forum.world.st/Voyage-Circular-references-tp4691940p4699436.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.



[Pharo-users] no SortedDictionary available?

2013-07-17 Thread Sabine Knöfel
Hi,

I am looking for a Dictionary which sorts its entries by the keys. 
Some Kind of SortedDictionary.
I assume, there is none - right?

I only found the OrderPreservingDictionary (which is not the same).

Background: storing exchangerates by date.

Sabine





--
View this message in context: 
http://forum.world.st/no-SortedDictionary-available-tp4699050.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.



Re: [Pharo-users] no SortedDictionary available?

2013-07-17 Thread Sabine Knöfel
correction/more precise: where I can define the sort order. If I add Dates as
keys in a dict, they are sorted by printstring (?). I need the dict to sort
date keys by time.
Sabine



--
View this message in context: 
http://forum.world.st/no-SortedDictionary-available-tp4699050p4699052.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.



Re: [Pharo-users] no SortedDictionary available?

2013-07-17 Thread Sabine Knöfel
Hi Clement,

thank you for the fast response.
I will use OrderPreservingDictionary instead.

Sabine

On Wed, Jul 17, 2013 at 11:32 AM, Clément Bera-4 [via Smalltalk]
ml-node+s1294792n4699062...@n4.nabble.com wrote:
 There is currently no sorted dictionary in Pharo.

 There's only OrderedIdentityDictionary / OrderPreservingDictionary which are
 different.

 If you implement one or find an opensource implementation somewhere, Marcus
 will be pleased to integrate it in Pharo.


 2013/7/17 Sabine Knöfel [hidden email]

 correction/more precise: where I can define the sort order. If I add Dates
 as
 keys in a dict, they are sorted by printstring (?). I need the dict to
 sort
 date keys by time.
 Sabine



 --
 View this message in context:
 http://forum.world.st/no-SortedDictionary-available-tp4699050p4699052.html
 Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.




 
 If you reply to this email, your message will be added to the discussion
 below:
 http://forum.world.st/no-SortedDictionary-available-tp4699050p4699062.html
 To unsubscribe from no SortedDictionary available?, click here.
 NAML




--
View this message in context: 
http://forum.world.st/no-SortedDictionary-available-tp4699050p4699068.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.

Re: [Pharo-users] baseline for seaside 3.0

2013-06-11 Thread Sabine Knöfel
I take a new 2.0. image and try to load only seaside with the following code:

baseline100: spec
version: '1.0-baseline'
spec
for: #common
do: [ 
spec blessing: #baseline.
spec project: 'seaside'
with: [ spec
className: 'ConfigurationOfSeaside30';
loads: #('ALL');
versionString: '3.0.8';
repository: 
'http://ss3.gemstone.com/ss/MetaRepoForPharo20' ] ]

version110: spec
version: '1.1' imports: #('1.0-baseline')
spec
for: #common
do: [ spec blessing: #development. ]

This fails when loading 'Kom''1.0.9' because projectPackage isNil.

I dont need to solve this probolem, I only need a snippet how to load
seaside within my Configuration of.

this is the Stack:
UndefinedObject(Object)doesNotUnderstand: #loadUsing:
MetacelloMCProjectSpecensureLoadedForDevelopmentUsing:
MetacelloMCVersionSpecLoaderload in Block: [:pkg | ...
Array(SequenceableCollection)do:
MetacelloMCVersionSpecLoaderload
MetacelloMCVersionexecuteLoadFromArray:
MetacelloMCVersionfetchRequiredFromArray: in Block: [:dict | ^ self
executeLoadFromArray: anArray]
MetacelloPharoPlatform(MetacelloPlatform)useStackCacheDuring:defaultDictionary:
in Block: [^ aBlock value: dict]
BlockClosureon:do:
MetacelloPharoPlatform(MetacelloPlatform)useStackCacheDuring:defaultDictionary:
MetacelloMCVersionfetchRequiredFromArray: in Block: [self versionSpec
loader: newLoader
BlockClosureensure:
MetacelloMCVersionfetchRequiredFromArray: in Block: [[self versionSpec
loader: newLoader
MetacelloPharoPlatformdo:displaying: in Block: [:bar | ...
BlockClosurecull:
Jobrun in Block: [result := block cull: self]
BlockClosureon:do:
Jobrun in Block: [self prepareForRunning
BlockClosureensure:
Jobrun
MorphicUIManager(UIManager)displayProgress:from:to:during:
ByteString(String)displayProgressFrom:to:during:
MetacelloPharoPlatformdo:displaying:
MetacelloMCVersionfetchRequiredFromArray:
MetacelloMCProjectSpecloadVersion: in Block: [:dict | ...
MetacelloPharoPlatform(MetacelloPlatform)useStackCacheDuring:defaultDictionary:
in Block: [^ aBlock value: dict]
BlockClosureon:do:
MetacelloPharoPlatform(MetacelloPlatform)useStackCacheDuring:defaultDictionary:
MetacelloMCProjectSpecloadVersion:
MetacelloMCProjectSpecload




--
View this message in context: 
http://forum.world.st/baseline-for-seaside-3-0-tp4692630p4692712.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.



Re: [Pharo-users] inspect returns iOf SystemWindow and not receiver

2013-06-11 Thread Sabine Knöfel
Thank you Marcus. 
I see there was a similar discussion in march in FogBuzz/Google. 
Next time I will look in FogBuzz before starting a diskussion here.
Sabine




--
View this message in context: 
http://forum.world.st/inspect-returns-iOf-SystemWindow-and-not-receiver-tp4692399p4692713.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.



Re: [Pharo-users] inspect returns iOf SystemWindow and not receiver

2013-06-11 Thread Sabine Knöfel
yes,
I am a head-scratching person, possibly old fashioned :-), coming from
other dialects and this is imho the best solution
Sabine

On Tue, Jun 11, 2013 at 9:58 AM, Marcus Denker-4 [via Smalltalk]
ml-node+s1294792n4692722...@n4.nabble.com wrote:

 On Jun 10, 2013, at 6:56 PM, [hidden email] wrote:

 Am 10.06.13 18:01, schrieb Marcus Denker:

 Breaks the Principal of Least Surprise for those you want to attract
 from other dialects.  They may end up with a strong opinion on it :)


 I am not against reverting the inspect change.. but it should be
 documented well, else this will be changed again in the future.

 Another thing is that starting from 3.0, I am sure that nobody will ever
 put inspect or halt anywhere as they will use meta-links
 instead…
 hmm. that is probably just 5 minutes away from Pharo's world domination
 ;-)
 As long as Pharo is Smalltalk inspired, people will probably come up
 with solutions they learned in Smalltalk. I have not yet come to be a
 frequent Pharo user, but coming from another Smalltalk dialect, I would
 probably face the same problem as Sabine mentioned it. I am not sure I use
 inspect in message cascades very often, because I tend to avoid cascades in
 methods that look or feel as if I may want to inspect preliminary results,
 so I am probably unlikely to tap into the same trap often. But if I would,
 I'd be scratching my head and ask myself what the heck this could ever be
 good for…

 So maybe we can
 - add #inspector that returns the tool
 - make inspect be like it was before (with documentation).

 Marcus





 
 If you reply to this email, your message will be added to the discussion
 below:
 http://forum.world.st/inspect-returns-iOf-SystemWindow-and-not-receiver-tp4692399p4692722.html
 To unsubscribe from inspect returns iOf SystemWindow and not receiver, click
 here.
 NAML




--
View this message in context: 
http://forum.world.st/inspect-returns-iOf-SystemWindow-and-not-receiver-tp4692399p4692726.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.

Re: [Pharo-users] baseline for seaside 3.0

2013-06-11 Thread Sabine Knöfel
Ok, I think I can answer my question myself:

spec
project: 'Seaside30' 
with: [
spec
 className: 'ConfigurationOfSeaside30';
 versionString: #'stable';
 loads: #('default');
 repository: 'http://www.squeaksource.com/MetacelloRepository' 
].   

works.





--
View this message in context: 
http://forum.world.st/baseline-for-seaside-3-0-tp4692630p4692747.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.



Re: [Pharo-users] inspect returns iOf SystemWindow and not receiver

2013-06-10 Thread Sabine Knöfel
Hi Marcus,

thank you. I can not see the entry because I have no access.
Is it possible to grant access for me so that I can, next time, look
if there is already a bug entry instead of starting a discussion in
the Forum?

Greetings
Sabine

On Sun, Jun 9, 2013 at 10:50 AM, Marcus Denker-4 [via Smalltalk]
ml-node+s1294792n4692435...@n4.nabble.com wrote:

 On Jun 8, 2013, at 8:30 PM, Sabine Knöfel [hidden email] wrote:

 Hi,

 while developing my app with seaside, I sometimes use inspect within any
 statement.
 I am used from Pharo 1.4 and from other smalltalk dialects, that inspect
 returns the receiver itself.
 But in Pharo 2.0 it returns an instance of SystemWindow.
 I dont see any sense in that. It that with intent?


 A bug report is here:

 https://pharo.fogbugz.com/f/cases/6989/Inspect-should-be-silent


 Marcus




 
 If you reply to this email, your message will be added to the discussion
 below:
 http://forum.world.st/inspect-returns-iOf-SystemWindow-and-not-receiver-tp4692399p4692435.html
 To unsubscribe from inspect returns iOf SystemWindow and not receiver, click
 here.
 NAML




--
View this message in context: 
http://forum.world.st/inspect-returns-iOf-SystemWindow-and-not-receiver-tp4692399p4692584.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.

Re: [Pharo-users] inspect returns iOf SystemWindow and not receiver

2013-06-10 Thread Sabine Knöfel
Hi Stef,

oh yes I know about halt but it is not the same as getting an inspector;-)

Don't you agree with me that in this point, Pharo should have the same
behaviour as the ohter smalltalk dialects (VisualAge/IBM Smalltalk,
VisualWorks, Gemstone)?

Greetings
Sabine

On Sun, Jun 9, 2013 at 4:38 PM, Stéphane Ducasse [via Smalltalk]
ml-node+s1294792n4692446...@n4.nabble.com wrote:
 but halt is really a simple method

 you can introduce myHalt

 ObjectmyHalt

 Halt signal.

 and you are done.

 Stef

 On Jun 9, 2013, at 9:58 AM, [hidden email] wrote:

 +1 to what Sabine says. Very useful behavior.

 Phil


 On Sun, Jun 9, 2013 at 8:03 AM, Sabine Knöfel [hidden email] wrote:

 I should give an example why this is not useful for me.

 While developing, I use inspect to see, what is in any object AND I want
 the app to proceed.
 E.g. while creating a report, I want to see the table columns in an
 inspector.
 I don't want to halt and debug, I only want to see an inspector.

 self currentPageadd:
 (PDFDataTableWithColumnsCaptionElement new
 captions: self costReportDaysTableColumns inspect;
 data: ...;

 Now, I have to write it like that

 self costReportDaysTableColumns inspect.
 self currentPage add:
 (PDFDataTableWithColumnsCaptionElement new
 captions: self costReportDaysTableColumns ;
 data: ...;

 Yes, this is possible but it is not so easigoing as simply put an inspect
 somewhere.

 Remarks:
 1) I develop a seaside app. I am not interested in the System Window;-)
 2) I cant find a selector onWindowClosed:
 3) inspect is a selector which exists in every smalltalk dialect. In
 every
 smalltalk dialect I worked with, inspect returned the receiver.  It is
 kind
 of standard IMHO.




 --
 View this message in context:
 http://forum.world.st/inspect-returns-iOf-SystemWindow-and-not-receiver-tp4692399p4692430.html
 Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.






 
 If you reply to this email, your message will be added to the discussion
 below:
 http://forum.world.st/inspect-returns-iOf-SystemWindow-and-not-receiver-tp4692399p4692446.html
 To unsubscribe from inspect returns iOf SystemWindow and not receiver, click
 here.
 NAML




--
View this message in context: 
http://forum.world.st/inspect-returns-iOf-SystemWindow-and-not-receiver-tp4692399p4692586.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.

Re: [Pharo-users] inspect returns iOf SystemWindow and not receiver

2013-06-09 Thread Sabine Knöfel
I should give an example why this is not useful for me.

While developing, I use inspect to see, what is in any object AND I want
the app to proceed.
E.g. while creating a report, I want to see the table columns in an
inspector.
I don't want to halt and debug, I only want to see an inspector.

self currentPageadd:
(PDFDataTableWithColumnsCaptionElement new   
captions: self costReportDaysTableColumns inspect;
data: ...;

Now, I have to write it like that

self costReportDaysTableColumns inspect.
self currentPage add:
(PDFDataTableWithColumnsCaptionElement new   
captions: self costReportDaysTableColumns ;
data: ...;

Yes, this is possible but it is not so easigoing as simply put an inspect
somewhere.

Remarks:
1) I develop a seaside app. I am not interested in the System Window;-)
2) I cant find a selector onWindowClosed:
3) inspect is a selector which exists in every smalltalk dialect. In every
smalltalk dialect I worked with, inspect returned the receiver.  It is kind
of standard IMHO.




--
View this message in context: 
http://forum.world.st/inspect-returns-iOf-SystemWindow-and-not-receiver-tp4692399p4692430.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.



[Pharo-users] inspect returns iOf SystemWindow and not receiver

2013-06-08 Thread Sabine Knöfel
Hi,

while developing my app with seaside, I sometimes use inspect within any
statement.
I am used from Pharo 1.4 and from other smalltalk dialects, that inspect
returns the receiver itself.
But in Pharo 2.0 it returns an instance of SystemWindow.
I dont see any sense in that. It that with intent?

Sabine



--
View this message in context: 
http://forum.world.st/inspect-returns-iOf-SystemWindow-and-not-receiver-tp4692399.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.