Converting TF-Login to use Fuel (rather than ReferenceStream)

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Converting TF-Login to use Fuel (rather than ReferenceStream)

sergio_101

I am currently converting TF-Login to use Fuel, so i can use it in Pharo 2.

One issue i am currently stuck on.. 

How do i go about serializing an object to a file using a path? it seems like all the files are dumped into the resource directory. In order to run the plugin (and the test) i need to dump everything into a named directory.

Anyone have any ideas? 

Thanks!
Reply | Threaded
Open this post in threaded view
|

Re: Converting TF-Login to use Fuel (rather than ReferenceStream)

Mariano Martinez Peck



On Tue, Jan 7, 2014 at 2:28 AM, sergio_101 <[hidden email]> wrote:

I am currently converting TF-Login to use Fuel, so i can use it in Pharo 2.


What is TF?
 
One issue i am currently stuck on.. 

How do i go about serializing an object to a file using a path? it seems like all the files are dumped into the resource directory. In order to run the plugin (and the test) i need to dump everything into a named directory.


mmm I am not sure if I get the problem. FLSerializer provides class side methods like #serialize: anObject on: aStream   so....the aStream could be whatever you want. In addition, we also provide #serialize:toFileNamed:  and the filename could be either without full path (then it is in same folder of image) or with full path. Example:

FLSerializer new serialize: 'foo' toFileNamed: '/Users/mariano/test.fuel'

 
Anyone have any ideas? 

Thanks!



--
Mariano
http://marianopeck.wordpress.com
Reply | Threaded
Open this post in threaded view
|

Re: Converting TF-Login to use Fuel (rather than ReferenceStream)

sergio_101
sorry.. the TF-Login is an authentication package located here: http://www.squeaksource.com/@jTrN1y3NPwL4Sngs/3CBaWLky

for some reason, i am missing the path when it saves.. it might be something to do with the the step where it builds the full filename. let me go down that route ..

thanks!



On Tue, Jan 7, 2014 at 7:53 AM, Mariano Martinez Peck <[hidden email]> wrote:



On Tue, Jan 7, 2014 at 2:28 AM, sergio_101 <[hidden email]> wrote:

I am currently converting TF-Login to use Fuel, so i can use it in Pharo 2.


What is TF?
 
One issue i am currently stuck on.. 

How do i go about serializing an object to a file using a path? it seems like all the files are dumped into the resource directory. In order to run the plugin (and the test) i need to dump everything into a named directory.


mmm I am not sure if I get the problem. FLSerializer provides class side methods like #serialize: anObject on: aStream   so....the aStream could be whatever you want. In addition, we also provide #serialize:toFileNamed:  and the filename could be either without full path (then it is in same folder of image) or with full path. Example:

FLSerializer new serialize: 'foo' toFileNamed: '/Users/mariano/test.fuel'

 
Anyone have any ideas? 

Thanks!



--
Mariano
http://marianopeck.wordpress.com



--
Reply | Threaded
Open this post in threaded view
|

Re: Converting TF-Login to use Fuel (rather than ReferenceStream)

sergio_101
that ended up being the case.. i ended up using FileReference's fullName to get the pathname, and appended that to the file name.. 

works fine now..

now, the 'finder' methods need to be updated, so that they return a FLMaterializer root.

will take a look at that tonight..




On Tue, Jan 7, 2014 at 8:11 AM, sergio_101 <[hidden email]> wrote:
sorry.. the TF-Login is an authentication package located here: http://www.squeaksource.com/@jTrN1y3NPwL4Sngs/3CBaWLky

for some reason, i am missing the path when it saves.. it might be something to do with the the step where it builds the full filename. let me go down that route ..

thanks!



On Tue, Jan 7, 2014 at 7:53 AM, Mariano Martinez Peck <[hidden email]> wrote:



On Tue, Jan 7, 2014 at 2:28 AM, sergio_101 <[hidden email]> wrote:

I am currently converting TF-Login to use Fuel, so i can use it in Pharo 2.


What is TF?
 
One issue i am currently stuck on.. 

How do i go about serializing an object to a file using a path? it seems like all the files are dumped into the resource directory. In order to run the plugin (and the test) i need to dump everything into a named directory.


mmm I am not sure if I get the problem. FLSerializer provides class side methods like #serialize: anObject on: aStream   so....the aStream could be whatever you want. In addition, we also provide #serialize:toFileNamed:  and the filename could be either without full path (then it is in same folder of image) or with full path. Example:

FLSerializer new serialize: 'foo' toFileNamed: '/Users/mariano/test.fuel'

 
Anyone have any ideas? 

Thanks!



--
Mariano
http://marianopeck.wordpress.com



--



--