Matias
Thanks for your report. Since it is working so well for you, I think it is time for me to give up working on the test suite and start using it for real. That will be for tomorrow (it’s almost midnight here now!). I have realised, by the way, that there is an easy work round for the Date problem. If you need to persist a Date with full time-zone consistency, just apply ‘start’ to it, which gives a DateAndTime. This will be stored and retrieved correctly. When it has been retrieved, just send asDate to recover the correct date. Best wishes Peter Kenny From: Pharo-users <pharo-users-boun...@lists.pharo.org> On Behalf Of Matias Maretto Sent: 24 June 2018 23:33 To: Any question about pharo is welcome <pharo-users@lists.pharo.org> Subject: Re: [Pharo-users] OmniBase for Pharo 6 Thank you for the info Peter ; I have been working storing and retrieving data , everything works fine. I have an ODBPErsistDictionary with almost 20.000 objects on it, I really get sorprised of how fast can resolve "select:[] commands"; I know it is not related with the subjet we are working, but well 😊 _____ De: Pharo-users <pharo-users-boun...@lists.pharo.org <mailto:pharo-users-boun...@lists.pharo.org> > en nombre de PBKResearch <pe...@pbkresearch.co.uk <mailto:pe...@pbkresearch.co.uk> > Enviado: domingo, 24 de junio de 2018 05:54 p. m. Para: 'Any question about pharo is welcome' Asunto: Re: [Pharo-users] OmniBase for Pharo 6 Hi Matias (and EstebanLM) I have explained the problem with storing and retrieving Date. Looking through the OmniBase code in the repository, I see that there is a whole series of extensions for many of the standard classes, which provide methods for serializing and deserializing instances of those classes. The extension for Date class ignores the start time, and simply saves the day number; the retrieval method can only use the days, and so cannot take account of the offset for the time zone. If it is necessary to save and restore dates in a way which is time-zone sensitive, it will be necessary to modify the code for serializing dates to store day and offset. I have not yet worked out how the methods are structured, so I have not tried to recode, but all the methods I have looked at are only one or two lines, so it should not be difficult. Looking through the classes with extensions, I realise that we may need to check rather more examples to be sure that everything is handled correctly. I did one little test with String. The standard test in TestEquality just stores and retrieves ‘Hello World’. To check that it could handle other encodings, I tried the test with a German string encoded in utf8. This worked OK. So thus far everything is fine, but it would be a good idea to check correct retrieval each time we persist a new class of object. Best wishes Peter Kenny From: Pharo-users <pharo-users-boun...@lists.pharo.org <mailto:pharo-users-boun...@lists.pharo.org> > On Behalf Of Matias Maretto Sent: 23 June 2018 19:40 To: Any question about pharo is welcome <pharo-users@lists.pharo.org <mailto:pharo-users@lists.pharo.org> > Subject: Re: [Pharo-users] OmniBase for Pharo 6 Hi Peter, thanks for the news. I have been doing some tests, persisting diferent kind of objects and until now everythings works fine. If you find anything else, please let me now. Thanks. Matias. _____ De: Pharo-users <pharo-users-boun...@lists.pharo.org <mailto:pharo-users-boun...@lists.pharo.org> > en nombre de PBKResearch <pe...@pbkresearch.co.uk <mailto:pe...@pbkresearch.co.uk> > Enviado: sábado, 23 de junio de 2018 05:18 p. m. Para: 'Any question about pharo is welcome' Asunto: Re: [Pharo-users] OmniBase for Pharo 6 Hi Matias A further report. I have worked through the test suite in OmniBaseTests, running each test individually. I now have all green except two – testEquality, which fails on the storage and retrieval of ‘Date today’, and testGC, which fails for reasons I have not yet found. The worrying thing is the apparent change in the instance variables of Date – see my exchange with Alistair Grant in another thread. I shall try to work through the way OmniBase saves and resets the instvars, just in case it might be a general problem. I shall let you know of anything else I find. Peter Kenny From: Pharo-users <pharo-users-boun...@lists.pharo.org <mailto:pharo-users-boun...@lists.pharo.org> > On Behalf Of PBKResearch Sent: 23 June 2018 09:18 To: 'Any question about pharo is welcome' <pharo-users@lists.pharo.org <mailto:pharo-users@lists.pharo.org> > Subject: Re: [Pharo-users] OmniBase for Pharo 6 Matias Thanks. I have made this change, but it does not affect the tests I have run. I have focused on getting the test suite in OmniBaseTests to run. So far I still have 5 greens, 7 reds and one orange. The greens are all the first five test methods in the browser list; it seems it half fails on the sixth one (TestEquality), hence the orange, and then red for all the rest. One problem is that the test database is created at the start of the test suite, and then not removed at the end. This seems to mess up the next attempt to run the tests. I tried to run the OmniBaseTests>>#tearDown manually, but it fails, so I have to exit Pharo and delete the test database in Windows. I intend to continue running the test suite, but I shall run the tests individually, and put breakpoints in those that fail. I shall report here if I make any progress. Best wishes Peter Kenny From: Pharo-users <pharo-users-boun...@lists.pharo.org <mailto:pharo-users-boun...@lists.pharo.org> > On Behalf Of Matias Maretto Sent: 23 June 2018 01:37 To: Any question about pharo is welcome <pharo-users@lists.pharo.org <mailto:pharo-users@lists.pharo.org> > Subject: Re: [Pharo-users] OmniBase for Pharo 6 Peter: I think I found the problem. On ODBFileStream class >> accessModeReadOnly the "o" on "only" is not capital. It is ^#accessModeReadonly when should be ^#accessModeReadOnly ; so on the ODBWin32FileStream >> createOn: createMode: accessMode: shareMode: cacheMode: this part fails: accessMode = #accessModeReadOnly ifTrue: [acMode := 2147483648 "GENERIC_READ"]. So it cant open the users file for read. I have fix it and at least for now I didn't get any "block" error. _____ De: Pharo-users <pharo-users-boun...@lists.pharo.org <mailto:pharo-users-boun...@lists.pharo.org> > en nombre de PBKResearch <pe...@pbkresearch.co.uk <mailto:pe...@pbkresearch.co.uk> > Enviado: viernes, 22 de junio de 2018 10:39 p. m. Para: 'Any question about pharo is welcome' Asunto: Re: [Pharo-users] OmniBase for Pharo 6 Matias Thanks for the hints. I now have 5 greens, but all the rest are red. I am still getting the ‘File cannot be locked’ message. Are you doing better than that? I may try a few trials using it for real, rather than the test suite. Thanks again Peter Kenny From: Pharo-users <pharo-users-boun...@lists.pharo.org <mailto:pharo-users-boun...@lists.pharo.org> > On Behalf Of Matias Maretto Sent: 22 June 2018 22:54 To: Any question about pharo is welcome <pharo-users@lists.pharo.org <mailto:pharo-users@lists.pharo.org> > Subject: Re: [Pharo-users] OmniBase for Pharo 6 Hi Peter, yes I had the same error at the beginning. I have done 2 minor changes. Now it seems to be working fine (Although I am still running more tests). Here: ODBWin32FileStream >> closeHandle: aHandle "Close an open Win32 object handle, freeing any resources held by it. Once closed a handle is no longer valid. Answer whether the function succeeds. See Win32 SDK help for more information. BOOL CloseHandle( HANDLE hObject // handle of object to close );" "<apicall: ulong 'CloseHandle' (long) module:'kernel32.dll'>" ^ self ffiCall: #(ulong CloseHandle(long aHandle)) ODBWin32FileStream >> lockFile: aHandle offsetLow: loPos offsetHigh: hiPos lengthLow: loLength lengthHigh: hiLength "<apicall: long 'LockFile' (long ulong ulong ulong ulong) module: 'kernel32.dll'>" ^ self ffiCall: #(long LockFile #(long aHandle , ulong loPos , ulong hiPos , ulong loLength , ulong hiLength)) _____ De: Pharo-users <pharo-users-boun...@lists.pharo.org <mailto:pharo-users-boun...@lists.pharo.org> > en nombre de PBKResearch <pe...@pbkresearch.co.uk <mailto:pe...@pbkresearch.co.uk> > Enviado: viernes, 22 de junio de 2018 09:45 p. m. Para: 'Any question about pharo is welcome' Asunto: Re: [Pharo-users] OmniBase for Pharo 6 Matias I have just loaded Esteban’s package in a new Pharo 6.1 under Windows 10. I get an error message saying ‘File cannot be locked. Try again?’. When I select ‘no’, all tests are run and give red. Are you still running on win 7? If so, I must be doing something wrong. Can you give more details of the FFI corrections you made, please? Many thanks Peter Kenny From: Pharo-users <pharo-users-boun...@lists.pharo.org <mailto:pharo-users-boun...@lists.pharo.org> > On Behalf Of Matias Maretto Sent: 22 June 2018 21:07 To: Any question about pharo is welcome <pharo-users@lists.pharo.org <mailto:pharo-users@lists.pharo.org> > Subject: Re: [Pharo-users] OmniBase for Pharo 6 Esteban: it's working fine, I had to made a minor corrections on 2 FFI calls and now everithing seems to be working fine. For What I saw with Voyage-UnqLite only String Objects can be used to searilize; Omnibase allow to persist almost any kind of objects, thats the part I like about it. _____ De: Pharo-users <pharo-users-boun...@lists.pharo.org <mailto:pharo-users-boun...@lists.pharo.org> > en nombre de Esteban Lorenzano <esteba...@gmail.com <mailto:esteba...@gmail.com> > Enviado: jueves, 21 de junio de 2018 08:19 p. m. Para: Any question about pharo is welcome Asunto: Re: [Pharo-users] OmniBase for Pharo 6 I did it manually and I took like 5 min :P but this was really easy, just a bunch of FFI calls. Esteban > On 21 Jun 2018, at 15:31, Sean P. DeNigris <s...@clipperadams.com > <mailto:s...@clipperadams.com> > wrote: > > EstebanLM wrote >> I just made a “blind port”… migrated the old FFI to new UFFI > > Did you do this manually or use some migration tool? How long did it take? > > > > ----- > Cheers, > Sean > -- > Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html <http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html> Smalltalk - Pharo Smalltalk Users | Mailing List Archive forum.world.st Pharo Smalltalk Users forum and mailing list archive. Pharo User Forum >